Documentation of 'org.matheclipse.core.patternmatching.HashedPatternRules' Java class
HashedPatternRules
org.matheclipse.core.patternmatching

Class HashedPatternRules



  • public class HashedPatternRules
    extends java.lang.Object
    Data structure for HashedOrderlessMatcher. To set up a rule like
    Sin[x]^2+Cos[x]^2 -> 1
    use the method:
    setUpHashRule("Sin[x_]^2", "Cos[x_]^2", "1")
    • Constructor Detail

      • HashedPatternRules

        public HashedPatternRules(IExpr lhsPattern1,
                                  IExpr lhsPattern2,
                                  IExpr rhsResult,
                                  boolean defaultHashCode)
        Parameters:
        lhsPattern1 - first left-hand-side pattern
        lhsPattern2 - second left-hand-side pattern
        rhsResult - the right-hand-side result
        defaultHashCode -
      • HashedPatternRules

        public HashedPatternRules(IExpr lhsPattern1,
                                  IExpr lhsPattern2,
                                  IExpr rhsResult,
                                  IExpr condition,
                                  boolean defaultHashCode)
        Parameters:
        lhsPattern1 - first left-hand-side pattern
        lhsPattern2 - second left-hand-side pattern
        rhsResult - the right-hand-side result
        condition - a condition test
        defaultHashCode - TODO
    • Method Detail

      • getRHS

        public IExpr getRHS()
        Returns:
        the right-hand-side result
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • equals

        public boolean equals(java.lang.Object obj)
        Overrides:
        equals in class java.lang.Object
      • getCondition

        public IExpr getCondition()
        Get the Condition for this rule.
        Returns:
        may return null.
      • getHash1

        public int getHash1()
        Get the hash value for the first LHS expression.
        Returns:
        the hash1
      • getHash2

        public int getHash2()
        Get the hash value for the second LHS expression.
        Returns:
        the hash2
      • isPattern2

        public boolean isPattern2()
      • getRulesData

        public DownRulesData getRulesData()
        Get (or create) the rule {<first-left-hand-side>, <second-left-hand-side>}:=<right-hand-side>
        Returns:

DMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.