Package jmathexpr.arithmetic.op

Examples of jmathexpr.arithmetic.op.Multiplication


               
                if (d.isNegative()) {
                    return new EmptySet();
                } else if (d.isZero()) {
                    return new FiniteSet(new Division(new Negation(b),
                            new Multiplication(two, a)).evaluate());
                }
            }
           
            Expression sd = new Sqrt(dd);
            Expression x1 = new Division(
                    new Addition(new Negation(b), sd),
                    new Multiplication(two, a));
            Expression x2 = new Division(
                    new Subtraction(new Negation(b), sd),
                    new Multiplication(two, a));
           
            ExpressionContext.getInstance().addExpression(new Equality(Numbers.variable("x", 1), x1));
            ExpressionContext.getInstance().addExpression(new Equality(Numbers.variable("x", 2), x2));
           
            x1 = x1.evaluate();
View Full Code Here


           
            if (nf.matches(expr) && matchesPower(f.hit())) {
                return coeff.matches(Integers.getInstance().create(-1));
            }
           
            Multiplication ax = new Multiplication(coeff, f);
           
            if (ax.matches(expr) && matchesPower(f.hit())) { // P = ax^n
                return true;
            }
           
            Constant c = Numbers.constant("c");
            Division xc = new Division(f, c);
View Full Code Here

    @Override
    public void exitMultiplication(ExpressionsParser.MultiplicationContext ctx) {
        Expression rhs = stack.pop();
        Expression lhs = stack.pop();
       
        stack.push(new Multiplication(lhs, rhs));
    }
View Full Code Here

    @Override
    public void exitSimpleMultiplication(ExpressionsParser.SimpleMultiplicationContext ctx) {
        Expression rhs = stack.pop();
        Expression lhs = stack.pop();
       
        stack.push(new Multiplication(lhs, rhs));
    }
View Full Code Here

    @Override
    public Expression apply() {
        ANumber lcd = (ANumber) new Lcm(denominators).evaluate();

        return new Equality(new Multiplication(lcd, ((Equality) target).lhs()),
                            new Multiplication(lcd, ((Equality) target).rhs()));
    }
View Full Code Here

TOP

Related Classes of jmathexpr.arithmetic.op.Multiplication

Copyright © 2018 www.massapicom. 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.