code: protected void set(double values[][])
      {
          this.nRows  = values.length;
          this.nCols  = values[0].length;
          this.values = values;
  
          for (int r = 1; r < nRows; ++r) {
              nCols = Math.min(nCols, values[r].length);
          }
      }
docs: Set this matrix from a 2-d array of values.
  If the rows do not have the same length, then the matrix
  column count is the length of the shortest row.
  @param values the 2-d array of values