1 /* -*- C -*- */ 2 %apply gsl_vector_long *INOUT {gsl_vector_long *v}; 3 %apply gsl_vector_long *INOUT {gsl_vector_long *w}; 4 %apply gsl_matrix_long *INOUT {gsl_matrix_long *v}; 5 %apply gsl_matrix_long *INOUT {gsl_matrix_long *w}; 6 /* ------------------------------------------------------------------------- 7 ------------------------------------------------------------------------- 8 Vector functions 9 ------------------------------------------------------------------------- 10 ------------------------------------------------------------------------- */ 11 /* 12 * The following should mimic the Numeric.ones functions .... 13 */ 14 void gsl_vector_long_set_zero (gsl_vector_long * IN_SIZE_OUT); 15 void gsl_vector_long_set_all (gsl_vector_long * IN_SIZE_OUT, long IN); 16 int gsl_vector_long_set_basis (gsl_vector_long * IN_SIZE_OUT, size_t i); 17 18 19 int gsl_vector_long_fread (FILE * stream, gsl_vector_long * IN_SIZE_OUT); 20 int gsl_vector_long_fwrite (FILE * stream, const gsl_vector_long * IN); 21 int gsl_vector_long_fscanf (FILE * stream, gsl_vector_long * IN_SIZE_OUT); 22 int gsl_vector_long_fprintf (FILE * stream, const gsl_vector_long * IN, 23 const char *format); 24 25 /* 26 * Copy module provides the same 27 * int gsl_vector_long_memcpy (gsl_vector * INOUT, const gsl_vector * IN); 28 */ 29 30 int gsl_vector_long_reverse (gsl_vector_long * INOUT); 31 32 int gsl_vector_long_swap (gsl_vector_long * v, gsl_vector_long * w); 33 34 35 int gsl_vector_long_swap_elements (gsl_vector_long * INOUT, const size_t i, 36 const size_t j); 37 38 #if !defined(_GSL_BLOCK_COMPLEX_FUNCTIONS) 39 double gsl_vector_long_max (const gsl_vector_long * IN); 40 double gsl_vector_long_min (const gsl_vector_long * IN); 41 void gsl_vector_long_minmax (const gsl_vector_long * IN, long * OUTPUT, 42 long * OUTPUT); 43 44 size_t gsl_vector_long_max_index (const gsl_vector_long * IN); 45 size_t gsl_vector_long_min_index (const gsl_vector_long * IN); 46 void gsl_vector_long_minmax_index (const gsl_vector_long * IN, size_t * OUTPUT, 47 size_t * OUTPUT); 48 49 #endif 50 int gsl_vector_long_isnull(const gsl_vector_long *IN); 51 /* ------------------------------------------------------------------------- 52 ------------------------------------------------------------------------- 53 Matrix functions 54 ------------------------------------------------------------------------- 55 ------------------------------------------------------------------------- */ 56 57 /* 58 * The following should mimic the Numeric.ones functions .... 59 */ 60 61 void gsl_matrix_long_set_zero (gsl_matrix_long * IN_SIZE_OUT); 62 void gsl_matrix_long_set_all (gsl_matrix_long * IN_SIZE_OUT, long IN); 63 void gsl_matrix_long_set_identity (gsl_matrix_long * IN_SIZE_OUT); 64 65 66 int gsl_matrix_long_fread (FILE * stream, gsl_matrix_long * IN_SIZE_OUT); 67 int gsl_matrix_long_fwrite (FILE * stream, const gsl_matrix_long * IN); 68 int gsl_matrix_long_fscanf (FILE * stream, gsl_matrix_long * IN_SIZE_OUT); 69 int gsl_matrix_long_fprintf (FILE * stream, const gsl_matrix_long * IN, 70 const char *format); 71 72 /* 73 * int gsl_matrix_memcpy(gsl_matrix * dest, const gsl_matrix * src); 74 */ 75 int gsl_matrix_long_swap(gsl_matrix_long * v, gsl_matrix_long * w); 76 77 int gsl_matrix_long_swap_rows(gsl_matrix_long * INOUT, const size_t i, const size_t j); 78 int gsl_matrix_long_swap_columns(gsl_matrix_long * INOUT, const size_t i, 79 const size_t j); 80 int gsl_matrix_long_swap_rowcol(gsl_matrix_long * INOUT, const size_t i, const size_t j); 81 int gsl_matrix_long_transpose (gsl_matrix_long * INOUT); 82 83 /* 84 * Need a proper typemap for that 85 * int gsl_matrix_long_transpose_memcpy (gsl_matrix_long * OUT, const gsl_matrix_long * src); 86 */ 87 #if !defined(_GSL_BLOCK_COMPLEX_FUNCTIONS) 88 double gsl_matrix_long_max (const gsl_matrix_long * IN); 89 double gsl_matrix_long_min (const gsl_matrix_long * IN); 90 void gsl_matrix_long_minmax (const gsl_matrix_long * IN, long * OUTPUT, long * OUTPUT); 91 92 void gsl_matrix_long_max_index (const gsl_matrix_long * IN, size_t * OUTPUT, size_t *OUTPUT); 93 void gsl_matrix_long_min_index (const gsl_matrix_long * IN, size_t * OUTPUT, size_t *OUTPUT); 94 void gsl_matrix_long_minmax_index (const gsl_matrix_long * IN, size_t * OUTPUT, 95 size_t * OUTPUT,size_t * OUTPUT, size_t * OUTPUT); 96 #endif 97 int gsl_matrix_long_isnull (const gsl_matrix_long * IN); 98 99 100 gsl_vector_long_view gsl_matrix_long_diagonal(gsl_matrix_long *IN); 101 gsl_vector_long_view gsl_matrix_long_subdiagonal(gsl_matrix_long *IN, size_t k); 102 gsl_vector_long_view gsl_matrix_long_superdiagonal(gsl_matrix_long *IN, size_t k); 103