public class HashedPatternRules extends AbstractHashedPatternRules
HashedOrderlessMatcher.
To set up a rule likeSin[x]^2+Cos[x]^2 -> 1 setUpHashRule("Sin[x_]^2", "Cos[x_]^2", "1")fLHSPattern1, fLHSPattern2, fRulesData, hash1, hash2, hashSum| Constructor and Description |
|---|
HashedPatternRules(IExpr lhsPattern1,
IExpr lhsPattern2,
IExpr rhsResult,
boolean defaultHashCode) |
HashedPatternRules(IExpr lhsPattern1,
IExpr lhsPattern2,
IExpr rhsResult,
IExpr condition,
boolean defaultHashCode) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(java.lang.Object obj) |
IExpr |
evalDownRule(IExpr e1,
IExpr e2) |
IExpr |
getCondition()
Get the Condition for this rule.
|
IExpr |
getRHS() |
RulesData |
getRulesData()
Get (or create) the rule
{<first-left-hand-side>, <second-left-hand-side>}:=<right-hand-side> |
calculateHashcode, getHash1, getHash2, hashCode, isPattern1, isPattern2public HashedPatternRules(IExpr lhsPattern1, IExpr lhsPattern2, IExpr rhsResult, boolean defaultHashCode)
lhsPattern1 - first left-hand-side patternlhsPattern2 - second left-hand-side patternrhsResult - the right-hand-side resultdefaultHashCode - public HashedPatternRules(IExpr lhsPattern1, IExpr lhsPattern2, IExpr rhsResult, IExpr condition, boolean defaultHashCode)
lhsPattern1 - first left-hand-side patternlhsPattern2 - second left-hand-side patternrhsResult - the right-hand-side resultcondition - a condition testdefaultHashCode - TODOpublic boolean equals(java.lang.Object obj)
equals in class java.lang.Objectpublic IExpr getRHS()
public IExpr getCondition()
null.public RulesData getRulesData()
{<first-left-hand-side>, <second-left-hand-side>}:=<right-hand-side>public IExpr evalDownRule(IExpr e1, IExpr e2)
evalDownRule in class AbstractHashedPatternRules