132133134135136137138139140141142
// UtilEjml.print(A); // System.out.println("-------------------"); for( int i = 0; i < N-1; i++ ) { u.zero(); u.data[i+1] = 1; for( int j = i+2; j < N; j++ ) { u.data[j] = QH.get(j,i); }
150151152153154155156157158159160
// A.print(); for( int i = 0; i < n-2; i++ ) { alg.computeV(i); u.zero(); SpecializedOps.subvector(UBV,i,i+2,n-i-2,true,i+2,u); u.data[i+1] = 1; DenseMatrix64F Q = SpecializedOps.createReflector(u,alg.getGammasV()[i]);
749750751752753754755756757758759
@Test public void zero() { double d[] = new double[]{10,12.5,-2,5.5}; DenseMatrix64F mat = new DenseMatrix64F(2,2, true, d); mat.zero(); for( int i = 0; i < mat.getNumElements(); i++ ) { assertEquals(0,mat.get(i),1e-8); } }