Пример #1
0
    @Override
    public int hashCode() {

        int a   = multiplicand.hashCode();
        int b   = (int)scalar.getIndex();

        return 37 * (37 * ( (a ^ (a >>> 31))) + (b ^ (b >>> 31)));

    }
Пример #2
0
 @Override
 public Set<HasValue> bind( Term value )
     throws PatternMatchException {
     return multiplicand.bind( value );
 }
Пример #3
0
 @Override
 public Set<Symbol> free() {
     return multiplicand.free();
 }
Пример #4
0
 @Override
 public Pattern substitute( Term x, Symbol y ) {
     return new TMultiplicative( scalar, multiplicand.substitute( x,y ) );
 }
Пример #5
0
 @Override
 public Term reduce() throws EvaluationException {
     return new TMultiplicative( scalar, multiplicand.reduce() );
 }
Пример #6
0
 @Override
 public String toString() {
     return scalar.toString() + "(" + multiplicand.toString() + ")";
 }