Annotation of OpenXM/src/asir-contrib/packages/doc/nk_fb_gen_c/test1.h, Revision 1.1
1.1 ! takayama 1: /* $OpenXM$ */
! 2: #include <stdio.h>
! 3: #include <gsl/gsl_matrix.h>
! 4: #include <gsl/gsl_linalg.h>
! 5: #include <gsl/gsl_blas.h>
! 6: #include <gsl/gsl_errno.h>
! 7: #include <gsl/gsl_odeiv.h>
! 8: #include <gsl/gsl_multimin.h>
! 9:
! 10: #define N_VALUES 4
! 11: #define DIM 5
! 12: #define ODEIV_STEP_TYPE gsl_odeiv_step_rkf45
! 13: #define MOVE_T_SUCCESS 1
! 14: #define MOVE_T_FAIL 0
! 15: /* #define MULTIMIN_FDFMINIMIZER_TYPE gsl_multimin_fdfminimizer_conjugate_fr */
! 16: #define MULTIMIN_FDFMINIMIZER_TYPE gsl_multimin_fdfminimizer_steepest_descent
! 17: #define MAXSIZE 10
! 18:
! 19: gsl_matrix *a1, *b1, *c1, *e1;
! 20: gsl_matrix *a2, *b2, *c2, *e2;
! 21: gsl_matrix *p2, *q2, *p3, *q3, *r3;
! 22: gsl_matrix *db11;
! 23: gsl_matrix *dc11;
! 24: gsl_matrix *db12;
! 25: gsl_matrix *dc12;
! 26: gsl_matrix *db21;
! 27: gsl_matrix *dc21;
! 28: gsl_matrix *db22;
! 29: gsl_matrix *dc22;
! 30: gsl_matrix *dq21;
! 31: gsl_matrix *dq31;
! 32: gsl_matrix *dr31;
! 33: gsl_matrix *dq22;
! 34: gsl_matrix *dq32;
! 35: gsl_matrix *dr32;
! 36: gsl_matrix *inv_a1;
! 37: gsl_matrix *inv_a2;
! 38: gsl_matrix *inv_p2;
! 39: gsl_matrix *inv_p3;
! 40: gsl_matrix *pf1_m;
! 41: gsl_matrix *pf2_m;
! 42: gsl_matrix *pf1_nd_m;
! 43: gsl_matrix *pf2_nd_m;
! 44: gsl_matrix *pf11_m;
! 45: gsl_matrix *pf12_m;
! 46: gsl_matrix *pf22_m;
! 47: gsl_matrix *pft_m;
! 48: gsl_vector *grad_v;
! 49: double g_y1;
! 50: double g_y2;
! 51: double g_x11;
! 52: double g_x12;
! 53: double g_x22;
! 54: double g_r;
! 55: double g_s1;
! 56: double g_s2;
! 57: double g_s11;
! 58: double g_s12;
! 59: double g_s22;
! 60: double values[N_VALUES];
! 61: double move_t_points[DIM];
! 62:
! 63: void init_mat();
! 64: void set_abce_1(double x11, double x12, double x22, double y1, double y2, double r);
! 65: void set_abce_2(double x11, double x12, double x22, double y1, double y2, double r);
! 66: void set_pqr(double x11, double x12, double x22, double y1, double y2, double r);
! 67: void set_dbcqr(double x11, double x12, double x22, double y1, double y2, double r);
! 68: void pf1(double x11, double x12, double x22, double y1, double y2, double r);
! 69: void pf1_no_diag_shift(double x11, double x12, double x22, double y1, double y2, double r);
! 70: void pf2(double x11, double x12, double x22, double y1, double y2, double r);
! 71: void pf2_no_diag_shift(double x11, double x12, double x22, double y1, double y2, double r);
! 72: void pf11(double x11, double x12, double x22, double y1, double y2, double r);
! 73: void pf12(double x11, double x12, double x22, double y1, double y2, double r);
! 74: void pf21(double x11, double x12, double x22, double y1, double y2, double r);
! 75: void pf22(double x11, double x12, double x22, double y1, double y2, double r);
! 76: void pf_all(double x11, double x12, double x22, double y1, double y2, double r);
! 77: void invmat(gsl_matrix *m, gsl_matrix *invm);
! 78: void gsl_matrix_show(gsl_matrix *mat);
! 79: int move_t(double x11, double x12, double x22, double y1, double y2, double xx11, double xx12, double xx22, double yy1, double yy2, double *val);
! 80: int sys_t(double t, const double *y, double *val, double *params);
! 81: double *fbnd(int dim, double x[MAXSIZE][MAXSIZE], double y[], int maxdeg, int weight[]);
! 82: double my_f(const gsl_vector *v, void *params);
! 83: void my_df(const gsl_vector *v, void *param, gsl_vector *df);
! 84: void my_fdf(const gsl_vector *x, void *params, double *f, gsl_vector *df);
! 85: void gsl_vector_show(gsl_vector *mat);
! 86: void show_v(double *v, int n);
! 87: void grad(double x11, double x12, double x22, double y1, double y2, double r, double *val);
! 88: double *init_val(int dim, double x11, double x12, double x22, double y1, double y2, double s11, double s12, double s22, double s1, double s2);
! 89: void search_min(double *val);
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>