code: public <T extends Matrix> T to(MatrixFactory<T> factory) {
          T result = factory.apply(rows, columns);
          apply(LinearAlgebra.IN_PLACE_COPY_MATRIX_TO_MATRIX, result);
          return result;
      }
docs: Converts this matrix using the given {@code factory}.
  
  @param factory the factory that creates an output matrix
  @param <T> type of the result matrix
  
  @return converted matrix