3 #include "ConfReader.hh"
4 #include "FuncSelect.hh"
5 #include <gsl/gsl_rng.h>
6 #include <gsl/gsl_cdf.h>
11 int ConfReaderTest1();
14 int NoFuncSelectTest(bool);
20 int tests_complete
= 0;
36 const gsl_rng_type
*T
= gsl_rng_default
;
39 for (int i
= 0; i
< 200000; i
++)
41 cout
<<gsl_rng_uniform( r
)<<endl
;
54 FuncSelect
my_func( "gsl_cdf_tdist_P", myparams
, len
, NULL
);
56 result
= my_func
.evaluate();
57 cout
<<"Returned: "<<setprecision(16)<<result
<<endl
;
60 int NoFuncSelectTest(bool fsOn
= true)
69 FuncSelect
my_func( "gsl_cdf_gaussian_P", myparams
, len
, NULL
);
71 for (int i
= 0; i
< 100000; i
++)
76 temp
= my_func
.evaluate();
80 temp
= gsl_cdf_gaussian_P( 0.5, myparams
[1]);
90 World
testW( 6, 20, 20);
91 testW
.calc_proximity( 10 );
92 testW
.print_proximity();
97 cout
<<"ConfReaderTest1"<<endl
;
101 string scen
= "sdsd";
102 ConfReader
m( "bioc.conf" );
103 ConfReader
n( "nonexistant.conf" );
104 cout
<<m
.success()<<"\t true"<<endl
;
105 cout
<<n
.success()<<"\t false"<<endl
;
106 m
.field_int( "time", &time
);
108 m
.field_string( "scenario", &scen
);
110 // cout<<m.get_field_string("scenariof")<<";"<<endl;