Examples of op()


Examples of com.google.dexmaker.Code.op()

        code.loadConstant(constant1, 1);
        code.loadConstant(constant2, 2);
        Label baseCase = new Label();
        code.compare(Comparison.LT, baseCase, i, constant2);
        code.op(BinaryOp.SUBTRACT, a, i, constant1);
        code.op(BinaryOp.SUBTRACT, b, i, constant2);
        code.invokeStatic(fib, c, a);
        code.invokeStatic(fib, d, b);
        code.op(BinaryOp.ADD, result, c, d);
        code.returnValue(result);
        code.mark(baseCase);
View Full Code Here

Examples of kodkod.ast.BinaryExpression.op()

          TupleSet ans = findUpper ? bounds.upperBound((Relation)expr) : bounds.lowerBound((Relation)expr);
          if (ans!=null) return makeMutable ? ans.clone() : ans;
       }
       else if (expr instanceof BinaryExpression) {
          BinaryExpression b = (BinaryExpression)expr;
          if (b.op() == ExprOperator.UNION) {
             TupleSet left = query(findUpper, b.left(), true);
             TupleSet right = query(findUpper, b.right(), false);
             left.addAll(right);
             return left;
          }
View Full Code Here

Examples of kodkod.ast.BinaryFormula.op()

    final ListIterator<Formula> itr = formulas.listIterator();
    while(itr.hasNext()) {
      final Formula f = itr.next();
      if (f instanceof BinaryFormula) {
        final BinaryFormula bin = (BinaryFormula) f;
        if (bin.op()==FormulaOperator.AND) {
          itr.remove();
          itr.add(bin.left());
          itr.add(bin.right());
          itr.previous();
          itr.previous();
View Full Code Here

Examples of kodkod.ast.ComparisonFormula.op()

             return simplify_in(f.left()) && simplify_in(f.right());
          }
       }
       if (form instanceof ComparisonFormula) {
          ComparisonFormula f = (ComparisonFormula)form;
          if (f.op() == ExprCompOperator.SUBSET) {
             if (!simplify_in(f.left(), f.right())) return false;
          }
          if (f.op() == ExprCompOperator.EQUALS) {
             if (!simplify_in(f.left(), f.right())) return false;
             if (!simplify_in(f.right(), f.left())) return false;
View Full Code Here

Examples of kodkod.ast.NaryFormula.op()

          itr.previous();
          itr.previous();
        }
      } else if (f instanceof NaryFormula) {
        final NaryFormula nf = (NaryFormula) f;
        if (nf.op()==FormulaOperator.AND) {
          itr.remove();
          for(Formula child : nf) {
            itr.add(child);
          }
          for(int i = nf.size(); i>0; i--) {
View Full Code Here

Examples of kodkod.engine.bool.BooleanAccumulator.op()

    if (options.logTranslation()>0) {
      final TranslationLogger logger = options.logTranslation()==1 ? new MemoryLogger(annotated, bounds) : new FileLogger(annotated, bounds);
      final BooleanAccumulator circuit = FOL2BoolTranslator.translate(annotated, interpreter, logger);
      log = logger.log();
      if (circuit.isShortCircuited()) {
        throw new TrivialFormulaException(annotated.node(), bounds, circuit.op().shortCircuit(), log);
      } else if (circuit.size()==0) {
        throw new TrivialFormulaException(annotated.node(), bounds, circuit.op().identity(), log);
      }
      return generateSBP(circuit, interpreter, breaker);
    } else {
View Full Code Here

Examples of kodkod.engine.bool.BooleanValue.op()

        throw new TrivialFormulaException(annotated.node(), bounds, circuit.op().identity(), log);
      }
      return generateSBP(circuit, interpreter, breaker);
    } else {
      final BooleanValue circuit = (BooleanValue)FOL2BoolTranslator.translate(annotated, interpreter);
      if (circuit.op()==Operator.CONST) {
        throw new TrivialFormulaException(annotated.node(), bounds, (BooleanConstant)circuit, null);
      }
      return generateSBP(annotated, (BooleanFormula)circuit, interpreter, breaker);
    }
  }
View Full Code Here

Examples of org.jquantlib.math.distributions.BinomialDistribution.op()

        final BinomialDistribution binomdist = new BinomialDistribution(p,n);

        for(int i=0;i<n;i++){
            final int z = i;
            final double expected = testvalues[i];
            final double computed = binomdist.op(z);

            // double tolerance = (z<6 ) ? 1.0e-15: 1.0e-10;
            final double tolerance = 1.0e-15; // try to to get 1.0e-15 accuracy whenever possible

            //assertEquals(expected, computed, tolerance);
View Full Code Here

Examples of org.jquantlib.math.distributions.BivariateNormalDistribution.op()

      final double tolerance = 1.0e-15;
      for (final double element : rho) {
          for (Integer sgn=-1; sgn < 2; sgn+=2) {
              final BivariateNormalDistribution bvn= new BivariateNormalDistribution(sgn*element);
              final double expected = 0.25 + Math.asin(sgn*element) / (2*Math.PI) ;
              final double realised = bvn.op(x,y);

              if (Math.abs(realised-expected)>=tolerance)
                fail(" bivariate cumulative distribution\n"
                            + "    rho: " + sgn*element + "\n"
                            + "    expected:  " + expected + "\n"
View Full Code Here

Examples of org.jquantlib.math.distributions.CumulativeBinomialDistribution.op()

        final int n = testvalues.length;      // number of trials

        final CumulativeBinomialDistribution cumbinomdist = new CumulativeBinomialDistribution(p,n);
        for (int i=0;i<testvalues.length;i++) {
            final double expected = testvalues[i];
            final double realised = cumbinomdist.op(i); // i = number of successful events
            final double tolerance = 1.0e-11;
            if (Math.abs(expected-realised)>tolerance) {
                fail("x: " + i + " expected: " + expected + " realised: " + realised);
            }
        }
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.