207
unsigned long gsl_matrix_ulong_get(const gsl_matrix_ulong * m, const size_t i, const size_t j);
208
void gsl_matrix_ulong_set(gsl_matrix_ulong * m, const size_t i, const size_t j, const unsigned long x);
210
unsigned long * gsl_matrix_ulong_ptr(gsl_matrix_ulong * m, const size_t i, const size_t j);
211
const unsigned long * gsl_matrix_ulong_const_ptr(const gsl_matrix_ulong * m, const size_t i, const size_t j);
213
208
void gsl_matrix_ulong_set_zero (gsl_matrix_ulong * m);
214
209
void gsl_matrix_ulong_set_identity (gsl_matrix_ulong * m);
215
210
void gsl_matrix_ulong_set_all (gsl_matrix_ulong * m, unsigned long x);
256
251
int gsl_matrix_ulong_get_col(gsl_vector_ulong * v, const gsl_matrix_ulong * m, const size_t j);
257
252
int gsl_matrix_ulong_set_row(gsl_matrix_ulong * m, const size_t i, const gsl_vector_ulong * v);
258
253
int gsl_matrix_ulong_set_col(gsl_matrix_ulong * m, const size_t j, const gsl_vector_ulong * v);
254
/***********************************************************************/
260
256
/* inline functions if you are using GCC */
258
INLINE_DECL unsigned long gsl_matrix_ulong_get(const gsl_matrix_ulong * m, const size_t i, const size_t j);
259
INLINE_DECL void gsl_matrix_ulong_set(gsl_matrix_ulong * m, const size_t i, const size_t j, const unsigned long x);
260
INLINE_DECL unsigned long * gsl_matrix_ulong_ptr(gsl_matrix_ulong * m, const size_t i, const size_t j);
261
INLINE_DECL const unsigned long * gsl_matrix_ulong_const_ptr(const gsl_matrix_ulong * m, const size_t i, const size_t j);
262
263
#ifdef HAVE_INLINE
265
266
gsl_matrix_ulong_get(const gsl_matrix_ulong * m, const size_t i, const size_t j)
267
268
#if GSL_RANGE_CHECK
270
GSL_ERROR_VAL("first index out of range", GSL_EINVAL, 0) ;
272
else if (j >= m->size2)
274
GSL_ERROR_VAL("second index out of range", GSL_EINVAL, 0) ;
269
if (GSL_RANGE_COND(1))
273
GSL_ERROR_VAL("first index out of range", GSL_EINVAL, 0) ;
275
else if (j >= m->size2)
277
GSL_ERROR_VAL("second index out of range", GSL_EINVAL, 0) ;
277
281
return m->data[i * m->tda + j] ;
282
286
gsl_matrix_ulong_set(gsl_matrix_ulong * m, const size_t i, const size_t j, const unsigned long x)
284
288
#if GSL_RANGE_CHECK
287
GSL_ERROR_VOID("first index out of range", GSL_EINVAL) ;
289
else if (j >= m->size2)
291
GSL_ERROR_VOID("second index out of range", GSL_EINVAL) ;
289
if (GSL_RANGE_COND(1))
293
GSL_ERROR_VOID("first index out of range", GSL_EINVAL) ;
295
else if (j >= m->size2)
297
GSL_ERROR_VOID("second index out of range", GSL_EINVAL) ;
294
301
m->data[i * m->tda + j] = x ;
299
306
gsl_matrix_ulong_ptr(gsl_matrix_ulong * m, const size_t i, const size_t j)
301
308
#if GSL_RANGE_CHECK
304
GSL_ERROR_NULL("first index out of range", GSL_EINVAL) ;
306
else if (j >= m->size2)
308
GSL_ERROR_NULL("second index out of range", GSL_EINVAL) ;
309
if (GSL_RANGE_COND(1))
313
GSL_ERROR_NULL("first index out of range", GSL_EINVAL) ;
315
else if (j >= m->size2)
317
GSL_ERROR_NULL("second index out of range", GSL_EINVAL) ;
311
321
return (unsigned long *) (m->data + (i * m->tda + j)) ;
315
325
const unsigned long *
316
326
gsl_matrix_ulong_const_ptr(const gsl_matrix_ulong * m, const size_t i, const size_t j)
318
328
#if GSL_RANGE_CHECK
321
GSL_ERROR_NULL("first index out of range", GSL_EINVAL) ;
323
else if (j >= m->size2)
325
GSL_ERROR_NULL("second index out of range", GSL_EINVAL) ;
329
if (GSL_RANGE_COND(1))
333
GSL_ERROR_NULL("first index out of range", GSL_EINVAL) ;
335
else if (j >= m->size2)
337
GSL_ERROR_NULL("second index out of range", GSL_EINVAL) ;
328
341
return (const unsigned long *) (m->data + (i * m->tda + j)) ;