public class AlgebraicUtil extends Object
| Constructor and Description |
|---|
AlgebraicUtil() |
| Modifier and Type | Method and Description |
|---|---|
static BinaryEval |
commutate(BinaryEval inputExpr)
Commutate two terms which are added, subtracted and multiplied.
|
static boolean |
containSingleVar(EvalNode expr) |
static EvalNode |
createSingletonExprFromCNF(EvalNode... cnfExprs)
Convert a list of conjunctive normal forms into a singleton expression.
|
static EvalNode |
createSingletonExprFromDNF(EvalNode... cnfExprs)
Convert a list of conjunctive normal forms into a singleton expression.
|
static EvalNode |
eliminateConstantExprs(EvalNode expr)
Simplify the given expr.
|
static EvalType |
inverseOperator(EvalType type)
Inverse a given operator (+, -, *, /)
|
static boolean |
isIndexableOperator(EvalNode expr) |
static PartialBinaryExpr |
splitLeftTerm(BinaryEval binary)
Split the left term and transform it into the right deep expression.
|
static PartialBinaryExpr |
splitRightTerm(BinaryEval binary)
Split the left term and transform it into the right deep expression.
|
static EvalNode[] |
toConjunctiveNormalFormArray(EvalNode expr)
Transforms a expression to an array of conjunctive normal formed expressions.
|
static EvalNode[] |
toDisjunctiveNormalFormArray(EvalNode... exprs)
Transforms a expression to an array of disjunctive normal formed expressions.
|
static EvalNode |
transpose(EvalNode evalNode,
Column target)
Transpose a given comparison expression into the expression
where the variable corresponding to the target is placed
on the left-hand side.
|
public static EvalNode transpose(EvalNode evalNode, Column target)
evalNode - target - public static EvalType inverseOperator(EvalType type)
type - public static EvalNode eliminateConstantExprs(EvalNode expr)
expr - to be simplifiedpublic static boolean containSingleVar(EvalNode expr)
expr - to be evaluated if the expr includes one variablepublic static PartialBinaryExpr splitLeftTerm(BinaryEval binary)
binary - - notice the left term of this expr will be eliminated
after done.public static PartialBinaryExpr splitRightTerm(BinaryEval binary)
binary - - to be splitedCloneNotSupportedExceptionpublic static BinaryEval commutate(BinaryEval inputExpr)
inputExpr - public static boolean isIndexableOperator(EvalNode expr)
public static EvalNode createSingletonExprFromCNF(EvalNode... cnfExprs)
cnfExprs - public static EvalNode[] toConjunctiveNormalFormArray(EvalNode expr)
expr - The expression to be transformed to an array of CNF-formed expressions.public static EvalNode createSingletonExprFromDNF(EvalNode... cnfExprs)
cnfExprs - public static EvalNode[] toDisjunctiveNormalFormArray(EvalNode... exprs)
exprs - The expressions to be transformed to an array of CNF-formed expressions.Copyright © 2015 Apache Software Foundation. All Rights Reserved.