code: public void setRow(int row, double[] vals) {
          if (vals.length != cols)
              throw new IllegalArgumentException(
                  "The number of values does not match the number of columns");
          for (int i = 0; i < vals.length; ++i)
              set(row, i, vals[i]);
      }
docs: {@inheritDoc}