Examples of solve()


Examples of net.sf.javailp.Solver.solve()

    problem.setObjective(constructObjective(), OptType.MIN);
   
    //TODO Relaxations relax = new Relaxations();
   
    final Solver solver = factory.get();
    final Result result = solver.solve(problem);
   
    if (result == null) {
      System.out.println("[ERROR]: cannot enforce constraints, no result for LP");
    } else {
     
View Full Code Here

Examples of no.uib.cipr.matrix.BandCholesky.solve()

        int n = L.numRows();

        BandCholesky c = new BandCholesky(n, kl, false);
        c.factor(L.copy());

        c.solve(I);

        Matrix J = I.mult(L, new DenseMatrix(n, n));
        for (int i = 0; i < n; ++i)
            for (int j = 0; j < n; ++j)
                if (i != j)
View Full Code Here

Examples of no.uib.cipr.matrix.BandLU.solve()

        int n = A.numRows();

        BandLU lu = new BandLU(n, kl, ku);
        lu.factor(A.copy());

        lu.solve(I);

        Matrix J = I.mult(A, new DenseMatrix(n, n));
        for (int i = 0; i < n; ++i)
            for (int j = 0; j < n; ++j)
                if (i != j)
View Full Code Here

Examples of no.uib.cipr.matrix.DenseCholesky.solve()

        DenseCholesky c = new DenseCholesky(n, false);
        c.factor(L.copy());

    assert I != null;
        c.solve(I);

        Matrix J = I.mult(L, new DenseMatrix(n, n));
        for (int i = 0; i < n; ++i)
            for (int j = 0; j < n; ++j)
                if (i != j)
View Full Code Here

Examples of no.uib.cipr.matrix.DenseLU.solve()

  public void testDenseLU() {
    int n = A.numRows();
    DenseLU lu = new DenseLU(n, n);
    lu.factor(A.copy());

    lu.solve(I);

    Matrix J = I.mult(A, new DenseMatrix(n, n));
    for (int i = 0; i < n; ++i)
      for (int j = 0; j < n; ++j)
        if (i != j)
View Full Code Here

Examples of no.uib.cipr.matrix.PackCholesky.solve()

        int n = L.numRows();

        PackCholesky c = new PackCholesky(n, false);
        c.factor(L.copy());

        c.solve(I);

        Matrix J = I.mult(L, new DenseMatrix(n, n));
        for (int i = 0; i < n; ++i)
            for (int j = 0; j < n; ++j)
                if (i != j)
View Full Code Here

Examples of no.uib.cipr.matrix.sparse.IterativeSolver.solve()

                    1e-12, 1e+5);
            monitor.setNormType(norm);
            solver.setIterationMonitor(monitor);

            try {
                solver.solve(A, b_dist, x_dist);
            } catch (IterativeSolverNotConvergedException e) {
                // This will just lead to an error later on
            }

            for (int i = n[rank]; i < n[rank + 1]; ++i)
View Full Code Here

Examples of org.apache.commons.math.analysis.BrentSolver.solve()

                  }
              }
          });
          solver.setAbsoluteAccuracy(convergence);
          solver.setMaximalIterationCount(maxIterationCount);
          double root = solver.solve(ta, tb);
          if (Double.isNaN(previousEventTime) || (Math.abs(previousEventTime - root) > convergence)) {
              pendingEventTime = root;
              if (pendingEvent && (Math.abs(t1 - pendingEventTime) <= convergence)) {
                  // we were already waiting for this event which was
                  // found during a previous call for a step that was
View Full Code Here

Examples of org.apache.commons.math.analysis.UnivariateRealSolver.solve()

                double sign = Math.signum(f.value(x[0]));
                for (int i = 1; i < n; i++) {
                    double isig = Math.signum(f.value(x[i]));
                    if (isig != sign) {
                        zeros.add(solver.solve(x[i - 1], x[i]));
                        sign = isig;
                    }
                }
            }
            return zeros;
View Full Code Here

Examples of org.apache.commons.math.analysis.solvers.BrentSolver.solve()

    double root;
    int iterations;
    double estimatedPrecision = DoubleVector.EPSILON; // not exposed by commons math impl

    try {
      root = solver.solve(maximumIterations, new UnivariateRealClosure(context, rho, fn), lower, upper);
      iterations = 1; // the Commons math impl doesn't expose this
    } catch (MaxIterationsExceededException e) {
      root = DoubleVector.NA;
      iterations = -1;
    } catch (FunctionEvaluationException e) {
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.