code: private void increaseSizeTo(int newSize) {
      assert (newSize > pointers.length);
      double[][] pointersBuf = new double[newSize][];
      boolean[] sparseBuf = new boolean[newSize];
      boolean[] copyOnWriteBuf = new boolean[newSize];
      System.arraycopy(pointers, 0, pointersBuf, 0, pointers.length);
      System.arraycopy(sparse, 0, sparseBuf, 0, pointers.length);
      System.arraycopy(copyOnWrite, 0, copyOnWriteBuf, 0, pointers.length);
      pointers = pointersBuf;
      sparse = sparseBuf;
      copyOnWrite = copyOnWriteBuf;
    }
docs: This increases the length of the vector, while preserving its contents
  
  @param newSize the new size to increase to. Must be larger than the current size