public class GroupInvExpr extends AbstractGroupElementExpression
GroupElementExpression representing the inversion of another group element expression.| Modifier and Type | Field and Description |
|---|---|
protected GroupElementExpression |
base |
group| Constructor and Description |
|---|
GroupInvExpr(GroupElementExpression base) |
| 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 |
getBase()
Retrieves the group element expression being inverted.
|
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 |
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, op, op, opPow, opPow, opPow, opPow, opPow, opPow, opPow, opPow, pow, pow, pow, pow, pow, precompute, substitute, substituteaccumulate, containsExprMatchingPredicate, containsVariables, getVariables, treeWalkprotected GroupElementExpression base
public GroupInvExpr(@Nonnull
GroupElementExpression base)
public GroupElementExpression getBase()
public void forEachChild(java.util.function.Consumer<Expression> action)
ExpressionGroupOpExpr, this would call action on the left- and right-hand-side and then return.public GroupElement evaluate(Substitution substitutions)
Expressionsubstitutions - a function mapping variables to expressions that can be evaluatedpublic GroupElementExpression substitute(Substitution substitutions)
Expressionsubstitutions - a function mapping variable expressions to their replacement expressionspublic 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