Examples of solve()


Examples of org.jquantlib.math.solvers1D.Brent.solve()

                // is it really required?
                ts.interpolation().update();

                try {
                    final BootstrapError error = new BootstrapError(traits, ts, instrument, i);
                    final double r = solver.solve (error, ts.accuracy(), guess, min, max);
                    // redundant assignment (as it has been already performed
                    // by BootstrapError in solve procedure), but safe
                    data[i] = r;
                } catch (final Exception e) {
                    validCurve = false;
View Full Code Here

Examples of org.jquantlib.math.solvers1D.FalsePosition.solve()

      }
    };

    final FalsePosition falsePosition = new FalsePosition();

    double root = falsePosition.solve(f, accuracy, guess, xMin, xMax);

    if (Math.abs(1.0-root)> accuracy) {
      fail("expected: 1.0" + " but root is: " + root);
    }
View Full Code Here

Examples of org.jquantlib.math.solvers1D.Newton.solve()

      }
    };

    final Newton newt = new Newton();

    double root = newt.solve(f, accuracy, guess, xMin, xMax);

    // assertEquals(1.0, root, accuracy);
    if (Math.abs(1.0-root)> accuracy) {
      fail("expected: 1.0" + " but root is: " + root);
    }
View Full Code Here

Examples of org.jquantlib.math.solvers1D.NewtonSafe.solve()

        final BlackImpliedStdDevHelper f = new BlackImpliedStdDevHelper(optionType, strike, forward, blackPrice / discount);
        final NewtonSafe solver = new NewtonSafe();
        solver.setMaxEvaluations(maxIterations);
        final double minSdtDev = 0.0, maxstddev = 3.0;
        final double stddev = solver.solve(f, accuracy, guess, minSdtDev, maxstddev);

        if (stddev >= 0.0) return stddev;
        throw new ArithmeticException("a negative value was calculated"); // TODO: add more logging
    }
View Full Code Here

Examples of org.jquantlib.math.solvers1D.Ridder.solve()

      }
    };

    final Ridder ridder = new Ridder();

    double root = ridder.solve(f, accuracy, guess, xMin, xMax);

    if (Math.abs(1.0-root)> accuracy) {
      fail("expected: 1.0" + " but root is: " + root);
    }
View Full Code Here

Examples of org.jquantlib.math.solvers1D.Secant.solve()

      }
    };

    final Secant secant = new Secant();

    double root = secant.solve(f, accuracy, guess, xMin, xMax);

    if (Math.abs(1.0-root)> accuracy) {
      fail("expected: 1.0" + " but root is: " + root);
    }
View Full Code Here

Examples of org.moxie.Solver.solve()

  }

  private Solver solve(Dependency dep) throws IOException, MaxmlException {
    Solver solver = getSolver();
    solver.getBuildConfig().getPom().addDependency(dep, Scope.compile);
    solver.solve();
    return solver;
  }

  @Test
  public void testParsing1() throws IOException, MaxmlException {
View Full Code Here

Examples of org.netbeans.modules.php.nette.editor.resolvers.HtmlPhpResolver.solve()

      Token t = sequence.token();
      if(t.id() == LatteTopTokenId.LATTE) {
        latteResolver.solve(t, sequence);                    // deals with all latte macros
        SyntaxUtils.findArrayForHint(getSnapshot().getSource().getDocument(true), sequence);
      } else {
        htmlPhpResolver.solve(t, sequence);
      }
    }

    return super.getEmbeddings();
  }
View Full Code Here

Examples of org.netbeans.modules.php.nette.editor.resolvers.LatteResolver.solve()

    HtmlPhpResolver htmlPhpResolver = new HtmlPhpResolver(this);

    while(sequence.moveNext()) {
      Token t = sequence.token();
      if(t.id() == LatteTopTokenId.LATTE) {
        latteResolver.solve(t, sequence);                    // deals with all latte macros
        SyntaxUtils.findArrayForHint(getSnapshot().getSource().getDocument(true), sequence);
      } else {
        htmlPhpResolver.solve(t, sequence);
      }
    }
View Full Code Here

Examples of org.openntf.formula.ASTNode.solve()

      // benchmark the evaluate with a document as context

      try {
        time = System.nanoTime();
        FormulaContext ctx1 = Formulas.createContext(ntfDoc, Formulas.getParser());
        ntfDocResult = ast.solve(ctx1);
        docEvaluateTime += System.nanoTime() - time;
      } catch (Exception e) {
        System.out.println(NTF("Doc-Evaluate failed: ") + ERROR(e));
        e.printStackTrace();
        i = count;
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.