code: public String mkString(NumberFormat formatter, String rowsDelimiter, String columnsDelimiter) {
          // TODO: rewrite using iterators
          int[] formats = new int[columns];
  
          for (int i = 0; i < rows; i++) {
              for (int j = 0; j < columns; j++) {
                  double value = get(i, j);
                  String output = formatter.format(value);
                  int size = output.length();
                  formats[j] = size > formats[j] ? size : formats[j];
              }
          }
  
          StringBuilder sb = new StringBuilder();
  
          for (int i = 0; i < rows; i++) {
              for (int j = 0; j < columns; j++) {
                  String output = formatter.format(get(i, j));
                  int outputLength = output.length();
  
                  if (outputLength < formats[j]) {
                      int align = formats[j] - outputLength;
                      if (align > INDENTS.length - 1) {
                          indent(sb, align);
                      } else {
                          sb.append(INDENTS[align - 1]);
                      }
                  }
  
                  sb.append(output)
                          .append(j < columns - 1 ? columnsDelimiter : "");
              }
              sb.append(rowsDelimiter);
          }
  
          return sb.toString();
      }
docs: Converts this matrix into the string representation.
  
  @param formatter the number formatter
  @param rowsDelimiter the rows' delimiter
  @param columnsDelimiter the columns' delimiter
  
  @return the matrix converted to a string