Package mikera.matrixx

Examples of mikera.matrixx.AMatrix.asVector()


        solver.setA(A);
//        create AMatrix from AVector
        AMatrix B = b.asColumnMatrix();
        AMatrix X = solver.solve(B);
//        convert AMatrix into AVector and return
        return X.asVector();
    }
   
    /**
     * Returns the least squares solution to the equation A.X = B
     * Use this in the case of over-determined (more equations than unknowns) or
View Full Code Here


      AMatrix B = b.asColumnMatrix();
      AMatrix X = solver.solve(B);
//      if no solution
      if(X == null)
          return null;
      return X.asVector();
  }
 
  /**
     * For a square matrix A, returns a matrix whose each column is the
     * solution to the equation A.x = b, where b is the corresponsing column
View Full Code Here

    doGenericTests(g4);
  }
   
  @Test public void g_MatrixViews5x5() { 
    AMatrix m1=Matrixx.createRandomSquareMatrix(5);
    doGenericTests(m1.asVector());
    doGenericTests(m1.getRow(4));
    doGenericTests(m1.getColumn(1));
    doGenericTests(m1.getLeadingDiagonal());
  }
   
View Full Code Here

    doGenericTests(m1.getLeadingDiagonal());
  }
   
  @Test public void g_MatrixViews3x3() { 
    AMatrix m2=Matrixx.createRandomSquareMatrix(3);
    doGenericTests(m2.asVector());
    doGenericTests(m2.getRow(1));
    doGenericTests(m2.getColumn(1));
    doGenericTests(m2.getLeadingDiagonal());
    doGenericTests(new MatrixAsVector(m2));
  }
View Full Code Here

    doGenericTests(new MatrixAsVector(m2));
  }

  @Test public void g_MatrixViews4x5() { 
    AMatrix m3=Matrixx.createRandomMatrix(4,5);
    doGenericTests(m3.asVector());
    doGenericTests(m3.getRow(2));
    doGenericTests(m3.getColumn(2));
    doGenericTests(m3.subMatrix(1, 1, 2, 3).asVector());
    doGenericTests(new MatrixAsVector(m3));
  }
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.