code: public void set(int r, int c, double value) throws MatrixException
      {
          if ((r < 0) || (r >= nRows) || (c < 0) || (c >= nCols)) {
              throw new MatrixException(MatrixException.INVALID_INDEX);
          }
  
          values[r][c] = value;
      }
docs: Set the value of element [r,c].
  @param r the row index
  @param c the column index
  @param value the value
  @throws numbercruncher.MatrixException for an invalid index