public class Symbolic extends SimpleExpression
| Modifier and Type | Method and Description |
|---|---|
static Expression |
add(Expression e1,
Expression e2)
Returns addition of the two expressions with simplification.
|
static Expression |
addAll(java.util.List<Expression> exprs)
Returns an expression that adds all expressions in the given expression
list.
|
static Expression |
and(Expression e1,
Expression e2)
Returns and of two expressions with simplification.
|
static Expression |
decrement(Expression e)
Returns the given expression decremented by one.
|
static Expression |
divide(Expression e1,
Expression e2)
Returns division of two expressions with simplification.
|
static Expression |
eq(Expression e1,
Expression e2)
Returns comparison(==) of two expressions with simplification.
|
static Expression |
ge(Expression e1,
Expression e2)
Returns comparison(greater equal) of two expressions with simplification.
|
static Expression |
getClosedFormSum(Identifier id,
Expression lb,
Expression ub,
Expression e)
Returns the closed form of the given summation parameters,
sum(e) s.t.
|
static Expression |
getClosedFormSum(Identifier id,
Expression lb,
Expression ub,
Expression e,
java.lang.Boolean divisible)
Computes and returns the closed form expression of the given expression,
index, and bounds with the divisibility property of the given expression.
|
static Expression |
getCoefficient(Expression e,
Identifier id)
Returns the symbolic coefficient of the given identifier in the
expression.
|
static java.util.List<Expression> |
getCoefficient(Expression e,
java.util.List<Identifier> ids)
Returns the list of coefficient with respect to the given set of
identifiers.
|
static long |
getConstantCoefficient(Expression e)
Returns the constant term in the simplified expression.
|
static Expression |
getConstantCoefficient(Expression e,
java.util.List<Identifier> ids)
Returns the constant term with respect to the given set of variables.
|
static java.util.List<Expression> |
getDenominators(Expression e)
Returns a list of denominators if the expression contains divisions.
|
static java.util.List<Expression> |
getFactors(Expression e) |
static Expression |
getLeastCommonDenominator(Expression e) |
static java.util.List<Expression> |
getPolynomialCoef(Expression e,
Identifier id)
Returns a list of expressions which contains coefficients of n-th terms
when the given id is the basis.
|
static java.util.List<Expression> |
getTerms(Expression e)
Returns a list of terms for expressions with addition.
|
static java.util.List<Identifier> |
getVariables(Expression e)
Returns the list of variables if the given expression is affine.
|
static java.util.List<java.lang.Object> |
getVariablesOnLHS(Expression e)
Returns a list of comparison expressions equivalent to the given
expression.
|
static Expression |
gt(Expression e1,
Expression e2)
Returns comparison(greater) of two expressions with simplification.
|
static Expression |
increment(Expression e)
Returns the given expression incremented by one.
|
static boolean |
isAffine(Expression e,
java.util.List<Identifier> ids)
Checks if the given expression is an affine expression with respect to the
given list of identifiers.
|
static Expression |
le(Expression e1,
Expression e2)
Returns comparison(less equal) of two expressions with simplification.
|
static Expression |
lt(Expression e1,
Expression e2)
Returns comparison(less) of two expressions with simplification.
|
static Expression |
mod(Expression e1,
Expression e2)
Returns modulus of two expressions with simplification.
|
static Expression |
multiply(Expression e1,
Expression e2)
Returns multiplication of two expressions with simplification.
|
static Expression |
multiplyAll(java.util.List<Expression> exprs)
Returns an expression that multiplies all expressions in the given
expression list.
|
static Expression |
multiplyByLCM(Expression e)
Returns an expression multiplied by LCM of the denominators present in
the terms in the specified expression.
|
static Expression |
ne(Expression e1,
Expression e2)
Returns comparison(not equal) of two expressions with simplification.
|
static Expression |
negate(Expression e)
Returns negation of the given expression.
|
static Expression |
or(Expression e1,
Expression e2)
Returns or of two expressions with simplification.
|
static Expression |
power(Expression e,
int order)
Returns
|
static Expression |
simplify(Expression e)
Returns a simplified expression of the given expression with the default
option which turns on every suboptions.
|
static Expression |
simplify(Expression e,
int opt)
Returns a simplified expression of the given expression with the
user-specified option.
|
static Expression |
simplifyDivisible(Expression e)
Returns a simplified expression assuming the given expression is
divisible.
|
static void |
simplifyWithin(Traversable t) |
static Expression |
subtract(Expression e1,
Expression e2)
Returns subtraction of two expressions with simplification.
|
public static Expression simplify(Expression e)
e - the given expression.public static Expression simplify(Expression e, int opt)
e - the given expression.opt - the composable simplification option.
e.g., Symbolic.FOLD, Symbolic.FOLD+Symbolic.FACTORIZE, ...public static Expression add(Expression e1, Expression e2)
public static Expression subtract(Expression e1, Expression e2)
public static Expression multiply(Expression e1, Expression e2)
public static Expression divide(Expression e1, Expression e2)
public static Expression mod(Expression e1, Expression e2)
public static Expression and(Expression e1, Expression e2)
public static Expression or(Expression e1, Expression e2)
public static Expression eq(Expression e1, Expression e2)
public static Expression ne(Expression e1, Expression e2)
public static Expression le(Expression e1, Expression e2)
public static Expression lt(Expression e1, Expression e2)
public static Expression ge(Expression e1, Expression e2)
public static Expression gt(Expression e1, Expression e2)
public static Expression negate(Expression e)
public static Expression power(Expression e, int order)
e's power to the
orderwith simplification.
public static Expression increment(Expression e)
public static Expression decrement(Expression e)
public static java.util.List<java.lang.Object> getVariablesOnLHS(Expression e)
e - the given comparison expression.public static long getConstantCoefficient(Expression e)
e - the expression to be examined.public static Expression getConstantCoefficient(Expression e, java.util.List<Identifier> ids)
e - the expression to be examined.ids - the list of variables (identifiers).public static Expression getCoefficient(Expression e, Identifier id)
e - the expression to be examined.id - the identifier.public static java.util.List<Expression> getCoefficient(Expression e, java.util.List<Identifier> ids)
e - the expression to be examined.ids - the list of identifiers.public static java.util.List<Identifier> getVariables(Expression e)
e - the expression to be examined.public static boolean isAffine(Expression e, java.util.List<Identifier> ids)
e - the expression to be examined.ids - the list of identifiers.public static Expression getClosedFormSum(Identifier id, Expression lb, Expression ub, Expression e)
id - the index variable.lb - the lower bound of id.ub - the upper bound of id.e - the given expression.public static Expression simplifyDivisible(Expression e)
public static Expression getClosedFormSum(Identifier id, Expression lb, Expression ub, Expression e, java.lang.Boolean divisible)
public static java.util.List<Expression> getPolynomialCoef(Expression e, Identifier id)
e - the input expression.id - the basis variable.public static java.util.List<Expression> getTerms(Expression e)
public static java.util.List<Expression> getFactors(Expression e)
public static java.util.List<Expression> getDenominators(Expression e)
public static Expression addAll(java.util.List<Expression> exprs)
public static Expression multiplyAll(java.util.List<Expression> exprs)
public static Expression multiplyByLCM(Expression e)
public static Expression getLeastCommonDenominator(Expression e)
public static void simplifyWithin(Traversable t)