File indexing completed on 2025-02-21 10:03:54
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017
0018
0019
0020 #ifndef __GSL_SPLINALG_H__
0021 #define __GSL_SPLINALG_H__
0022
0023 #include <gsl/gsl_math.h>
0024 #include <gsl/gsl_vector.h>
0025 #include <gsl/gsl_matrix.h>
0026 #include <gsl/gsl_spmatrix.h>
0027 #include <gsl/gsl_linalg.h>
0028 #include <gsl/gsl_types.h>
0029
0030 #undef __BEGIN_DECLS
0031 #undef __END_DECLS
0032 #ifdef __cplusplus
0033 # define __BEGIN_DECLS extern "C" {
0034 # define __END_DECLS }
0035 #else
0036 # define __BEGIN_DECLS
0037 # define __END_DECLS
0038 #endif
0039
0040 __BEGIN_DECLS
0041
0042
0043 typedef struct
0044 {
0045 const char *name;
0046 void * (*alloc) (const size_t n, const size_t m);
0047 int (*iterate) (const gsl_spmatrix *A, const gsl_vector *b,
0048 const double tol, gsl_vector *x, void *);
0049 double (*normr)(const void *);
0050 void (*free) (void *);
0051 } gsl_splinalg_itersolve_type;
0052
0053 typedef struct
0054 {
0055 const gsl_splinalg_itersolve_type * type;
0056 double normr;
0057 void * state;
0058 } gsl_splinalg_itersolve;
0059
0060
0061 GSL_VAR const gsl_splinalg_itersolve_type * gsl_splinalg_itersolve_gmres;
0062
0063
0064
0065
0066 gsl_splinalg_itersolve *
0067 gsl_splinalg_itersolve_alloc(const gsl_splinalg_itersolve_type *T,
0068 const size_t n, const size_t m);
0069 void gsl_splinalg_itersolve_free(gsl_splinalg_itersolve *w);
0070 const char *gsl_splinalg_itersolve_name(const gsl_splinalg_itersolve *w);
0071 int gsl_splinalg_itersolve_iterate(const gsl_spmatrix *A,
0072 const gsl_vector *b,
0073 const double tol, gsl_vector *x,
0074 gsl_splinalg_itersolve *w);
0075 double gsl_splinalg_itersolve_normr(const gsl_splinalg_itersolve *w);
0076
0077 __END_DECLS
0078
0079 #endif