/* composition_roc.h */ #ifndef __COMPOSITION_ROC_H__ #define __COMPOSITION_ROC_H__ #include /* drand48() */ #include #include enum{ N_SAMPLES = 100000, N_PARTS = 2, N_OBS_PER_PARTS = 3, RAND_SEED = 20130521 }; typedef struct _Pgm Pgm; struct _Pgm { int m; // n. of parts */ int n1, n2; double sigma; double **p; }; Pgm* pgm_new(); int generate_x(Pgm* model, int *x); // return 1 if x=(1,1) void generate_y(Pgm* model, int *x, double **y); double compute_postprob_x11(Pgm* model, double **y); double compute_statistics(Pgm* model, double **y, int s); double compute_s_template(Pgm* model, double **y); double compute_s_parts(Pgm* model, double **y); double compute_s_parts_saccade(Pgm* model, double **y); double compute_s_first_part_k(Pgm* model, double **y, int k); double compute_s_second_part_k(Pgm* model, double **y, int k); void test_print_var(Pgm* model, int *x, double **y, int *z); #endif // __COMPOSITION_ROC_H__