assign3/mat.cpp
// set the value of an element of the matrix
set the value of an element of the matrix
set the value of an element of the matrix
double Matrix::set(int r, int c, double v)
{
    if (r<0 || r>=maxr || c<0 || c>=maxc) {
        printf("ERROR(set): index out of bounds: asking for (%d, %d) but size is %d X %d\n",
               r, c, maxr, maxc);
        exit(1);
    }
    m[r][c] = v;
    return m[r][c];
}
double Matrix :: set ( int r , int c , double v ) { if ( r < 0 || r >= maxr || c < 0 || c >= maxc ) { printf ( " \n " , r , c , maxr , maxc ) ; exit ( 1 ) ; } m [ r ] [ c ] = v ; return m [ r ] [ c ] ; }
set the value of an element of the matrix
set the value of an element of the matrix
//    printf("SET: %llu @ %d %d %lf\n", (unsigned long long int)this, r, c, v);