public class GroupEmptyExpr extends AbstractGroupElementExpression
GroupElementConstantExpr with a neutral element in the sense that the neutral element
is replaced on a group operation, leading to saving one potential group operation.group| Constructor and Description |
|---|
GroupEmptyExpr() |
GroupEmptyExpr(Group group) |
| Modifier and Type | Method and Description |
|---|---|
GroupElement |
evaluate(Substitution substitutions)
Evaluates the expression after substituting contained variables.
|
GroupOpExpr |
flatten(ExponentExpr exponent)
Linearizes the expression \(\text{this}^\text{exponent}\).
|
void |
forEachChild(java.util.function.Consumer<Expression> action)
Calls action on every (direct) child of this expression.
|
GroupElementExpression |
inv() |
GroupOpExpr |
linearize()
Returns an equivalent expression of the form
y * f(groupVariables, exponentVariables),
where y is constant (no variables), and the expression f is linear. |
GroupElementExpression |
op(GroupElement rhs) |
GroupElementExpression |
op(GroupElementExpression rhs) |
GroupElementExpression |
pow(java.math.BigInteger exponent) |
GroupElementExpression |
pow(ExponentExpr exponent) |
GroupElementExpression |
pow(RingElement exponent) |
GroupElementExpression |
substitute(Substitution substitutions)
Substitutes variables using the given function.
|
getGroup, getGroupOrderIfKnownclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitevaluate, flatten, isEqualTo, isEqualTo, isEqualTo, op, opPow, opPow, opPow, opPow, opPow, opPow, opPow, opPow, pow, pow, precompute, substitute, substituteaccumulate, containsExprMatchingPredicate, containsVariables, getVariables, treeWalkpublic GroupEmptyExpr(Group group)
public GroupEmptyExpr()
public GroupElement evaluate(Substitution substitutions)
Expressionsubstitutions - a function mapping variables to expressions that can be evaluatedpublic void forEachChild(java.util.function.Consumer<Expression> action)
ExpressionGroupOpExpr, this would call action on the left- and right-hand-side and then return.public GroupElementExpression substitute(Substitution substitutions)
Expressionsubstitutions - a function mapping variable expressions to their replacement expressionspublic GroupElementExpression op(GroupElementExpression rhs)
public GroupElementExpression op(GroupElement rhs)
public GroupElementExpression pow(ExponentExpr exponent)
public GroupElementExpression pow(java.math.BigInteger exponent)
public GroupElementExpression pow(RingElement exponent)
public GroupElementExpression inv()
public GroupOpExpr linearize() throws java.lang.IllegalArgumentException
GroupElementExpressiony * f(groupVariables, exponentVariables),
where y is constant (no variables), and the expression f is linear.
Linearity means that
f(groupVariables, exponentVariables) * f(groupVariables2, exponentVariables2) = f(groupVariables * groupVariables2, exponentVariables + exponentVariables2)The exact result is a
GroupOpExpr where the left-hand-side y fulfills
y.containsVariables() == false and the right-hand side is linear.java.lang.IllegalArgumentException - if it's not possible to form the desired output
(e.g., the input is something like \(g^{x_1 \cdot x_2}\) for variables \(x_1, x_2\)).public GroupOpExpr flatten(ExponentExpr exponent)
GroupElementExpression