/** Check results against symmetric matrices that are randomly generated */
  public void checkRandomSymmetric() {
    for (int N = 1; N <= 15; N++) {
      for (int i = 0; i < 20; i++) {
        //                DenseMatrix64F A = RandomMatrices.createSymmetric(N,-1,1,rand);
        AMatrix z = Matrixx.createRandomMatrix(3, 3);
        AMatrix A = z.innerProduct(z.getTranspose());

        SymmetricQRAlgorithmDecomposition alg = createDecomposition();

        assertNotNull(alg.decompose(A));

        performStandardTests(alg, A.toMatrix(), -1);
      }
    }
  }
Example #2
0
 /**
  * Builds a matrix using a copy of the data in this MatrixBuilder
  *
  * @return
  */
 public AMatrix toMatrix() {
   AVector[] nd = new AVector[length];
   System.arraycopy(data, 0, nd, 0, length);
   return Matrixx.createFromVectors(nd);
 }