Package jmathexpr.arithmetic.op

Examples of jmathexpr.arithmetic.op.Multiplication.lhs()


            return numerator.matches(((Division) expr).lhs())
                    && denominator.matches(((Division) expr).rhs());
        } else if (expr instanceof Multiplication) {
            Multiplication m = (Multiplication) expr;
           
            if (matches(m.lhs())) { // a/b * c -> ac/b
                return numerator.matches(new Multiplication(numerator.hit(), m.rhs()));
            } else if (matches(m.rhs())) { // a * b/c -> ab/c
                return numerator.matches(new Multiplication(m.lhs(), numerator.hit()));
            }
        }
View Full Code Here


            Multiplication m = (Multiplication) expr;
           
            if (matches(m.lhs())) { // a/b * c -> ac/b
                return numerator.matches(new Multiplication(numerator.hit(), m.rhs()));
            } else if (matches(m.rhs())) { // a * b/c -> ab/c
                return numerator.matches(new Multiplication(m.lhs(), numerator.hit()));
            }
        }
       
        return false;
    }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.