예제 #1
0
 public void testRepeatFactorNonSquare() {
   RQ rq = new RQ(Ac.numRows(), Ac.numColumns());
   rq.factor(new DenseMatrix(Ac));
   assertEquals(Ac, rq);
   rq.factor(new DenseMatrix(Ac));
   assertEquals(Ac, rq);
 }
예제 #2
0
 public void testRepeatFactor() {
   RQ rq = new RQ(A.numRows(), A.numColumns());
   rq.factor(new DenseMatrix(A));
   assertEquals(A, rq);
   rq.factor(new DenseMatrix(A));
   assertEquals(A, rq);
 }
예제 #3
0
 private void assertEquals(Matrix A, RQ rq) {
   assertEquals(A, rq.getR().mult(rq.getQ(), A.copy().zero()));
 }
예제 #4
0
 public void testRepeatStaticFactorizeNonSquare() {
   assertEquals(Ac, RQ.factorize(Ac));
   assertEquals(Ac, RQ.factorize(Ac));
 }
예제 #5
0
 public void testFactor() {
   RQ c = new RQ(A.numRows(), A.numColumns());
   assertEquals(A, c.factor(new DenseMatrix(A)));
 }
예제 #6
0
 public void testRepeatStaticFactorize() {
   assertEquals(A, RQ.factorize(A));
   assertEquals(A, RQ.factorize(A));
 }