Package cern.colt.matrix.linalg

Examples of cern.colt.matrix.linalg.LUDecompositionQuick.solve()


timer.reset().start();
for (int i=runs; --i >=0; ) {
  solved.assign(b);
  //Inv.assign(I);
  //lu.decompose(LU);
  lu.solve(solved);
  //lu.solve(Inv);
}
timer.stop().display();

//System.out.println("A="+A);
View Full Code Here


timer.reset().start();
for (int i=runs; --i >=0; ) {
  solved.assign(b);
  //Inv.assign(I);
  //lu.decompose(LU);
  lu.solve(solved);
  //lu.solve(Inv);
}
timer.stop().display();

//System.out.println("A="+A);
View Full Code Here

  {
    LUDecompositionQuick solver = new LUDecompositionQuick();
    DoubleMatrix2D matrix = toDoubleMatrix2D();
    solver.decompose(matrix);solver.setLU(matrix);
    DoubleMatrix1D result = toDoubleMatrix1D();
    solver.solve(result);result.toArray(j_x);   
  }
 
  /** The following two variables are not currently in use.
   * The amount of memory currently allocated on the solver. Negative will force allocation. This is necessary for initialisation. */
  //private static int currentMaxSize = -1;
View Full Code Here

    coltSolver.decompose(matrix);coltSolver.setLU(matrix);
    DoubleMatrix1D vector = DoubleFactory1D.dense.make(matrix.rows(), 0);
   
    try
    {
      coltSolver.solve(vector);
    }
    catch(IllegalArgumentException ex)
    {
      if (ex.getMessage().contains("singular"))
        Assert.assertTrue(singular);
View Full Code Here

    verifyAxb(s);
   
    // Test 2
    LUDecompositionQuick solver = new LUDecompositionQuick();
    solver.decompose(testMatrix);solver.setLU(testMatrix);
    solver.solve(x);
    for(int i=0;i<testMatrix.rows();++i)
      Assert.assertEquals(i+1, x.getQuick(i),comparisonAccuracy);
    verifyAxb(s);

    // Test 3
View Full Code Here

    TestAbstractExperiment.checkForCorrectException(new whatToRun() {
      public void run() throws NumberFormatException {
        LUDecompositionQuick coltSolver = new LUDecompositionQuick();
        coltSolver.decompose(matrix);coltSolver.setLU(matrix);
        coltSolver.solve(x);
      }
    }, IllegalArgumentException.class,"singular");   

    TestAbstractExperiment.checkForCorrectException(new whatToRun() {
      public void run() throws NumberFormatException {
View Full Code Here

    long tmStarted = new Date().getTime();
    LUDecompositionQuick coltSolver = new LUDecompositionQuick();
    coltSolver.decompose(matrix);coltSolver.setLU(matrix);
   
    DoubleMatrix1D vector = b.copy();
    coltSolver.solve(vector);
    long tmFinished = new Date().getTime();
    System.out.println(" time taken: "+((double)tmFinished-tmStarted)/1000);
    verifyAxb(matrix, b, vector);
   
    tmStarted = new Date().getTime();
View Full Code Here

  {
    LUDecompositionQuick solver = new LUDecompositionQuick();
    DoubleMatrix2D matrix = toDoubleMatrix2D();
    solver.decompose(matrix);solver.setLU(matrix);
    DoubleMatrix1D result = toDoubleMatrix1D();
    solver.solve(result);result.toArray(j_x);   
  }
 
  /** The following two variables are not currently in use.
   * The amount of memory currently allocated on the solver. Negative will force allocation. This is necessary for initialisation. */
  //private static int currentMaxSize = -1;
View Full Code Here

    coltSolver.decompose(matrix);coltSolver.setLU(matrix);
    DoubleMatrix1D vector = DoubleFactory1D.dense.make(matrix.rows(), 0);
   
    try
    {
      coltSolver.solve(vector);
    }
    catch(IllegalArgumentException ex)
    {
      if (ex.getMessage().contains("singular"))
        Assert.assertTrue(singular);
View Full Code Here

  {
    LUDecompositionQuick solver = new LUDecompositionQuick();
    DoubleMatrix2D matrix = toDoubleMatrix2D();
    solver.decompose(matrix);solver.setLU(matrix);
    DoubleMatrix1D result = toDoubleMatrix1D();
    solver.solve(result);result.toArray(j_x);   
  }
 
  /** The following two variables are not currently in use.
   * The amount of memory currently allocated on the solver. Negative will force allocation. This is necessary for initialisation. */
  //private static int currentMaxSize = -1;
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.