1 /* -*- C -*- */ 2 /* ------------------------------------------------------------------------- 3 ------------------------------------------------------------------------- 4 Vector functions 5 ------------------------------------------------------------------------- 6 ------------------------------------------------------------------------- */ 7 /* 8 * The following should mimic the Numeric.ones functions .... 9 */ 10 void gsl_vector_double_set_zero (gsl_vector_double * IN_SIZE_OUT); 11 void gsl_vector_double_set_all (gsl_vector_double * IN_SIZE_OUT, double IN); 12 int gsl_vector_double_set_basis (gsl_vector_double * IN_SIZE_OUT, size_t i); 13 14 15 int gsl_vector_double_fread (FILE * stream, gsl_vector_double * IN_SIZE_OUT); 16 int gsl_vector_double_fwrite (FILE * stream, const gsl_vector_double * IN); 17 int gsl_vector_double_fscanf (FILE * stream, gsl_vector_double * IN_SIZE_OUT); 18 int gsl_vector_double_fprintf (FILE * stream, const gsl_vector_double * IN, 19 const char *format); 20 21 /* 22 * Copy module provides the same 23 * int gsl_vector_double_memcpy (gsl_vector * INOUT, const gsl_vector * IN); 24 */ 25 26 int gsl_vector_double_reverse (gsl_vector_double * INOUT); 27 28 29 %apply gsl_vector_double *INOUT {gsl_vector_double *v}; 30 %apply gsl_vector_double *INOUT {gsl_vector_double *w}; 31 int gsl_vector_double_swap (gsl_vector_double * v, gsl_vector_double * w); 32 33 34 int gsl_vector_double_swap_elements (gsl_vector_double * INOUT, const size_t i, 35 const size_t j); 36 37 #if !defined(_GSL_BLOCK_COMPLEX_FUNCTIONS) 38 double gsl_vector_double_max (const gsl_vector_double * IN); 39 double gsl_vector_double_min (const gsl_vector_double * IN); 40 void gsl_vector_double_minmax (const gsl_vector_double * IN, double * OUTPUT, 41 double * OUTPUT); 42 43 size_t gsl_vector_double_max_index (const gsl_vector_double * IN); 44 size_t gsl_vector_double_min_index (const gsl_vector_double * IN); 45 void gsl_vector_double_minmax_index (const gsl_vector_double * IN, size_t * OUTPUT, 46 size_t * OUTPUT); 47 48 #endif 49 int gsl_vector_double_isnull(const gsl_vector_double *IN); 50 /* ------------------------------------------------------------------------- 51 ------------------------------------------------------------------------- 52 Matrix functions 53 ------------------------------------------------------------------------- 54 ------------------------------------------------------------------------- */ 55 56 /* 57 * The following should mimic the Numeric.ones functions .... 58 */ 59 60 void gsl_matrix_double_set_zero (gsl_matrix_double * IN_SIZE_OUT); 61 void gsl_matrix_double_set_all (gsl_matrix_double * IN_SIZE_OUT, double IN); 62 void gsl_matrix_double_set_identity (gsl_matrix_double * IN_SIZE_OUT); 63 64 65 int gsl_matrix_double_fread (FILE * stream, gsl_matrix_double * IN_SIZE_OUT); 66 int gsl_matrix_double_fwrite (FILE * stream, const gsl_matrix_double * IN); 67 int gsl_matrix_double_fscanf (FILE * stream, gsl_matrix_double * IN_SIZE_OUT); 68 int gsl_matrix_double_fprintf (FILE * stream, const gsl_matrix_double * IN, 69 const char *format); 70 71 /* 72 * int gsl_matrix_memcpy(gsl_matrix * dest, const gsl_matrix * src); 73 */ 74 %apply gsl_matrix_double *INOUT {gsl_matrix_double *v}; 75 %apply gsl_matrix_double *INOUT {gsl_matrix_double *w}; 76 int gsl_matrix_double_swap(gsl_matrix_double * v, gsl_matrix_double * w); 77 78 int gsl_matrix_double_swap_rows(gsl_matrix_double * INOUT, const size_t i, const size_t j); 79 int gsl_matrix_double_swap_columns(gsl_matrix_double * INOUT, const size_t i, 80 const size_t j); 81 int gsl_matrix_double_swap_rowcol(gsl_matrix_double * INOUT, const size_t i, const size_t j); 82 int gsl_matrix_double_transpose (gsl_matrix_double * INOUT); 83 84 /* 85 * Need a proper typemap for that 86 * int gsl_matrix_double_transpose_memcpy (gsl_matrix_double * OUT, const gsl_matrix_double * src); 87 */ 88 #if !defined(_GSL_BLOCK_COMPLEX_FUNCTIONS) 89 double gsl_matrix_double_max (const gsl_matrix_double * IN); 90 double gsl_matrix_double_min (const gsl_matrix_double * IN); 91 void gsl_matrix_double_minmax (const gsl_matrix_double * IN, double * OUTPUT, double * OUTPUT); 92 93 void gsl_matrix_double_max_index (const gsl_matrix_double * IN, size_t * OUTPUT, size_t *OUTPUT); 94 void gsl_matrix_double_min_index (const gsl_matrix_double * IN, size_t * OUTPUT, size_t *OUTPUT); 95 void gsl_matrix_double_minmax_index (const gsl_matrix_double * IN, size_t * OUTPUT, 96 size_t * OUTPUT,size_t * OUTPUT, size_t * OUTPUT); 97 #endif 98 int gsl_matrix_double_isnull (const gsl_matrix_double * IN); 99 100 101 gsl_vector_double_view gsl_matrix_double_diagonal(gsl_matrix_double *IN); 102 gsl_vector_double_view gsl_matrix_double_subdiagonal(gsl_matrix_double *IN, size_t k); 103 gsl_vector_double_view gsl_matrix_double_superdiagonal(gsl_matrix_double *IN, size_t k); 104