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);
 }
 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);
 }
 private void assertEquals(Matrix A, RQ rq) {
   assertEquals(A, rq.getR().mult(rq.getQ(), A.copy().zero()));
 }
 public void testRepeatStaticFactorizeNonSquare() {
   assertEquals(Ac, RQ.factorize(Ac));
   assertEquals(Ac, RQ.factorize(Ac));
 }
 public void testFactor() {
   RQ c = new RQ(A.numRows(), A.numColumns());
   assertEquals(A, c.factor(new DenseMatrix(A)));
 }
 public void testRepeatStaticFactorize() {
   assertEquals(A, RQ.factorize(A));
   assertEquals(A, RQ.factorize(A));
 }