code: private List<List<Double>> deepCopy(final List<List<Double>> original) {
      final List<List<Double>> result = new ArrayList<>(original.size());
      for (final List<Double> originalRow : original) {
        final List<Double> row = new ArrayList<>(originalRow.size());
        for (final double element : originalRow) {
          row.add(element);
        }
        result.add(row);
      }
      return result;
    }
docs: Create a deep copy to make the matrix immutable.
  @param original Original matrix.
  @return Deep copy of the matrix.