57 const char *what =
set?
"set":
"access";
59 if ((r < 0) || (r >= num_rows))
61 cerr <<
"Tried to " << what <<
" row " << r <<
" of " << num_rows <<
" row matrix\n";
64 if ((c < 0) || (c >= num_columns))
66 cerr <<
"Tried to " << what <<
" column " << c <<
" of " << num_columns <<
" column matrix\n";
79 const char *what =
set?
"set":
"access";
83 if ((r < 0) || (r >= num_rows))
85 cerr <<
"Tried to " << what <<
" row " << r <<
" of " << num_rows <<
" row matrix\n";
88 if (r+nr-1 >= num_rows)
90 cerr <<
"Tried to " << what <<
" row " << r+nr-1 <<
" of " << num_rows <<
" row matrix\n";
96 if ((c < 0) || (c >= num_columns))
98 cerr <<
"Tried to " << what <<
" column " << c <<
" of " << num_columns <<
" column matrix\n";
101 if (c+nc-1 >= num_columns)
103 cerr <<
"Tried to " << what <<
" column " << c+nc-1 <<
" of " << num_columns <<
" column matrix\n";
115 const char *what =
set?
"set":
"access";
117 if ((c < 0) || (c >= num_columns))
119 cerr <<
"Tried to " << what <<
" column " << c <<
" of " << num_columns <<
" column vector\n";
130 const char *what =
set?
"set":
"access";
134 if ((c < 0) || (c >= num_columns))
136 cerr <<
"Tried to " << what <<
" column " << c <<
" of " << num_columns <<
" column vector\n";
139 if (c+nc-1 >= num_columns)
141 cerr <<
"Tried to " << what <<
" column " << c+nc-1 <<
" of " << num_columns <<
" column vector\n";
bool EST_matrix_bounds_check(int r, int c, int num_rows, int num_columns, bool set)
bool EST_vector_bounds_check(int c, int num_columns, bool set)