public AdjMatrix mult(AdjMatrix m2) {
   // both are assumed to be the same size
   if (m2.size() == this.size()) {
     Matrix retMatrix = new UpperSPDPackMatrix(size);
     data.mult(m2.getData(), retMatrix);
     return new AdjMatrix(retMatrix);
   } else return null;
 }
 private void assertEquals(Matrix A, RQ rq) {
   assertEquals(A, rq.getR().mult(rq.getQ(), A.copy().zero()));
 }
 public void print() {
   for (int y = 0; y < data.numRows(); y++) {
     for (int x = 0; x < data.numColumns(); x++) System.out.print((int) (data.get(x, y)) + " ");
     System.out.print("\n");
   }
 }
 public int size() {
   return data.numColumns();
 }
 private void internalWrite(int x, int y, int value) {
   data.set(x, y, value);
   data.set(y, x, value);
 }
 public int read(int x, int y) {
   return (int) data.get(x, y);
 }
 @Override
 public AdjMatrix clone() {
   return new AdjMatrix(data.copy());
 }
 public AdjMatrix(Matrix adj) {
   this.data = adj;
   this.size = data.numColumns();
 }