Examples of multiply()


Examples of javax.xml.datatype.Duration.multiply()

                int months = dur1.totalMonths();
                long ym = Math.round(months * d2);
                res = XsDatatypeFactory.createYearMonthDuration(ym);
            } else {
                Duration dv1 = dur1.getValue();
                res = dv1.multiply(BigDecimal.valueOf(d2));
            }
            return new DurationValue(res, dt);
        }
    }

View Full Code Here

Examples of jinngine.math.Matrix3.multiply()

    };
   
   
    // apply transform to all points
    for (Vector3 p: faceA) {
      p.assign( Binv.multiply(p.sub(midpoint)));
    }
    for (Vector3 p: faceB) {
      p.assign( Binv.multiply(p.sub(midpoint)));
    }
   
View Full Code Here

Examples of jinngine.math.Matrix4.multiply()

                1., 2., 3., 4.,
                5., 6., 7., 8.,
                9., 10, 11, 12,
                13, 14, 15, 16);
        final Vector3 v = new Vector3(100., 10000., 1000000.);
        final Vector3 r = m.multiply(v);
        assertNotSame(r, v);//new Vector3 is returned
        //Input is not changed
        assertMatrixEquals(new double[]{
                    1., 2., 3., 4.,
                    5., 6., 7., 8.,
View Full Code Here

Examples of jinngine.math.Vector3.multiply()

      //return new Vector3[] {y1,y2,y3,y4};
      if ( d1234_1 > 0 && d1234_2 > 0 && d1234_3 > 0 && d1234_4 > 0) {
        //GJK penetrating state

        //check for the accuracy, v should be the zero vector
        ify1.multiply(d1234_1/d1234).add(y2.multiply(d1234_2/d1234)).add(y3.multiply(d1234_3/d1234)).add(y4.multiply(d1234_4/d1234)).norm() > 1 ) {
          //System.out.println("wrong penetration");
          //result is bad, terminate with last good subset {y1,y2,y3}
          state.simplexSize = 3;
          return false;
        }
View Full Code Here

Examples of jmathexpr.arithmetic.ANumber.multiply()

                }
            } else if (r instanceof Multiplication) {
                Multiplication m = (Multiplication) r;
               
                if (m.lhs instanceof ANumber) { // a (bx) = (ab) x
                    l = a.multiply((ANumber) m.lhs);
                    r = m.rhs;
                } else if (m.rhs instanceof ANumber) { // a (xb) = (ab) x
                    l = a.multiply((ANumber) m.rhs);
                    r = m.lhs;
                }
View Full Code Here

Examples of jmathexpr.arithmetic.natural.NaturalNumber.multiply()

       
        for (NaturalNumber p : factors.primeFactors()) {
            if (isDivisibleBy(l, p) && isDivisibleBy(r, p)) {
                l = new Division(l, p).evaluate();
                r = new Division(r, p).evaluate();
                divisor = (NaturalNumber) divisor.multiply(p);
            }
        }
       
        ANumber simplifiedDenominator = denominator.divide(divisor);
        Expression numerator;
View Full Code Here

Examples of jscicalc.expression.Product.multiply()

  else if( this instanceof Complex ){
      if( x instanceof Complex ){
    return ((Complex)this).multiply( (Complex)x );
      } else if( x instanceof Variable ){
    Product p = new Product( (Variable)x, false );
    return p.multiply( (Complex)this );
      } else if( x instanceof Sum ){
    Product p = new Product( (Expression)x, false );
    return p.multiply( this );
      } else if( x instanceof Product ){
    Product p = (Product)x;
View Full Code Here

Examples of kodkod.ast.IntExpression.multiply()

            case NOT_GTE: i=cint(a);  f=i.gte(cint(b)).not()return k2pos(f,x);
            case AND: f=cform(a); f=f.and(cform(b)); return k2pos(f,x);
            case OR:  f=cform(a); f=f.or(cform(b))return k2pos(f,x);
            case IFF: f=cform(a); f=f.iff(cform(b)); return k2pos(f,x);
            case PLUSPLUS: s=cset(a); return s.override(cset(b));
            case MUL: i=cint(a); return i.multiply(cint(b));
            case DIV: i=cint(a); return i.divide(cint(b));
            case REM: i=cint(a); return i.modulo(cint(b));
            case SHL: i=cint(a); return i.shl(cint(b));
            case SHR: i=cint(a); return i.shr(cint(b));
            case SHA: i=cint(a); return i.sha(cint(b));
View Full Code Here

Examples of kodkod.engine.bool.Int.multiply()

    final Int first = intExpr.child(0).accept(this);
    final Int[] rest = new Int[intExpr.size()-1];
    for(int i = 0; i < rest.length; i++) {   rest[i] = intExpr.child(i+1).accept(this); }
    switch(intExpr.op()) {
    case PLUS      : ret = first.plus(rest); break;
    case MULTIPLY   : ret = first.multiply(rest); break;
    case AND    : ret = first.and(rest); break;
    case OR      : ret = first.or(rest); break;
    default    :
      throw new IllegalArgumentException("Unknown nary operator: " + intExpr.op());
    }
View Full Code Here

Examples of lipstone.joshua.parser.types.BigDec.multiply()

        String[] unit = stripPrefix((String) current.getCar());
        partial = this.units.get(unit[1]).getFactor();
        if (partial == null)
          throw new InvalidUnitException(current.getCar() + " is not a valid unit.", nl);
        if (unit[0].length() > 0)
          partial = partial.multiply(prefixes.get(unit[0]));
      }
      else if (current.getCarType() == ConsType.CONS_CELL) {
        ConsCell fact = parser.run(parser.preProcess((ConsCell) current.getCar()));
        if (fact.getCarType() != ConsType.NUMBER || fact.length() != 1)
          throw new InvalidUnitException(current.getCar() + " is not a valid unit set.", nl);
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.