|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.lsmp.djep.rewrite.AbstractRewrite
org.lsmp.djep.rewrite.CollectPowers
public class CollectPowers
Collect powers together so that x*x -> x^2 and x^n*x -> x^(n+1).
| Field Summary |
|---|
| Fields inherited from class org.lsmp.djep.rewrite.AbstractRewrite |
|---|
nf, opSet, tu, xj |
| Constructor Summary | |
|---|---|
CollectPowers(XJep xj)
|
|
| Method Summary | |
|---|---|
Node |
apply(ASTFunNode node,
Node[] children)
Rewrites the node |
boolean |
test(ASTFunNode node,
Node[] children)
Returns true if node needs to be rewritten, according to this rule. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public CollectPowers(XJep xj)
| Method Detail |
|---|
public boolean test(ASTFunNode node,
Node[] children)
RewriteRuleI
public Node apply(ASTFunNode node,
Node[] children)
throws ParseException
RewriteRuleI
ParseException
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||