1 /* -*- C -*- */ 2 %apply gsl_vector_int *INOUT {gsl_vector_int *v}; 3 %apply gsl_vector_int *INOUT {gsl_vector_int *w}; 4 %apply gsl_matrix_int *INOUT {gsl_matrix_int *v}; 5 %apply gsl_matrix_int *INOUT {gsl_matrix_int *w}; 6 /* ------------------------------------------------------------------------- 7 ------------------------------------------------------------------------- 8 Vector functions 9 ------------------------------------------------------------------------- 10 ------------------------------------------------------------------------- */ 11 /* 12 * The following should mimic the Numeric.ones functions .... 13 */ 14 void gsl_vector_int_set_zero (gsl_vector_int * IN_SIZE_OUT); 15 void gsl_vector_int_set_all (gsl_vector_int * IN_SIZE_OUT, int IN); 16 int gsl_vector_int_set_basis (gsl_vector_int * IN_SIZE_OUT, size_t i); 17 18 19 int gsl_vector_int_fread (FILE * stream, gsl_vector_int * IN_SIZE_OUT); 20 int gsl_vector_int_fwrite (FILE * stream, const gsl_vector_int * IN); 21 int gsl_vector_int_fscanf (FILE * stream, gsl_vector_int * IN_SIZE_OUT); 22 int gsl_vector_int_fprintf (FILE * stream, const gsl_vector_int * IN, 23 const char *format); 24 25 /* 26 * Copy module provides the same 27 * int gsl_vector_int_memcpy (gsl_vector * INOUT, const gsl_vector * IN); 28 */ 29 30 int gsl_vector_int_reverse (gsl_vector_int * INOUT); 31 32 int gsl_vector_int_swap (gsl_vector_int * v, gsl_vector_int * w); 33 34 35 int gsl_vector_int_swap_elements (gsl_vector_int * INOUT, const size_t i, 36 const size_t j); 37 38 #if !defined(_GSL_BLOCK_COMPLEX_FUNCTIONS) 39 double gsl_vector_int_max (const gsl_vector_int * IN); 40 double gsl_vector_int_min (const gsl_vector_int * IN); 41 void gsl_vector_int_minmax (const gsl_vector_int * IN, int * OUTPUT, 42 int * OUTPUT); 43 44 size_t gsl_vector_int_max_index (const gsl_vector_int * IN); 45 size_t gsl_vector_int_min_index (const gsl_vector_int * IN); 46 void gsl_vector_int_minmax_index (const gsl_vector_int * IN, size_t * OUTPUT, 47 size_t * OUTPUT); 48 49 #endif 50 int gsl_vector_int_isnull(const gsl_vector_int *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_int_set_zero (gsl_matrix_int * IN_SIZE_OUT); 62 void gsl_matrix_int_set_all (gsl_matrix_int * IN_SIZE_OUT, int IN); 63 void gsl_matrix_int_set_identity (gsl_matrix_int * IN_SIZE_OUT); 64 65 66 int gsl_matrix_int_fread (FILE * stream, gsl_matrix_int * IN_SIZE_OUT); 67 int gsl_matrix_int_fwrite (FILE * stream, const gsl_matrix_int * IN); 68 int gsl_matrix_int_fscanf (FILE * stream, gsl_matrix_int * IN_SIZE_OUT); 69 int gsl_matrix_int_fprintf (FILE * stream, const gsl_matrix_int * IN, 70 const char *format); 71 72 /* 73 * int gsl_matrix_memcpy(gsl_matrix * dest, const gsl_matrix * src); 74 */ 75 int gsl_matrix_int_swap(gsl_matrix_int * v, gsl_matrix_int * w); 76 77 int gsl_matrix_int_swap_rows(gsl_matrix_int * INOUT, const size_t i, const size_t j); 78 int gsl_matrix_int_swap_columns(gsl_matrix_int * INOUT, const size_t i, 79 const size_t j); 80 int gsl_matrix_int_swap_rowcol(gsl_matrix_int * INOUT, const size_t i, const size_t j); 81 int gsl_matrix_int_transpose (gsl_matrix_int * INOUT); 82 83 /* 84 * Need a proper typemap for that 85 * int gsl_matrix_int_transpose_memcpy (gsl_matrix_int * OUT, const gsl_matrix_int * src); 86 */ 87 #if !defined(_GSL_BLOCK_COMPLEX_FUNCTIONS) 88 double gsl_matrix_int_max (const gsl_matrix_int * IN); 89 double gsl_matrix_int_min (const gsl_matrix_int * IN); 90 void gsl_matrix_int_minmax (const gsl_matrix_int * IN, int * OUTPUT, int * OUTPUT); 91 92 void gsl_matrix_int_max_index (const gsl_matrix_int * IN, size_t * OUTPUT, size_t *OUTPUT); 93 void gsl_matrix_int_min_index (const gsl_matrix_int * IN, size_t * OUTPUT, size_t *OUTPUT); 94 void gsl_matrix_int_minmax_index (const gsl_matrix_int * IN, size_t * OUTPUT, 95 size_t * OUTPUT,size_t * OUTPUT, size_t * OUTPUT); 96 #endif 97 int gsl_matrix_int_isnull (const gsl_matrix_int * IN); 98 99 100 gsl_vector_int_view gsl_matrix_int_diagonal(gsl_matrix_int *IN); 101 gsl_vector_int_view gsl_matrix_int_subdiagonal(gsl_matrix_int *IN, size_t k); 102 gsl_vector_int_view gsl_matrix_int_superdiagonal(gsl_matrix_int *IN, size_t k); 103