本文整理汇总了C++中Experiment::get_n方法的典型用法代码示例。如果您正苦于以下问题:C++ Experiment::get_n方法的具体用法?C++ Experiment::get_n怎么用?C++ Experiment::get_n使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Experiment
的用法示例。
在下文中一共展示了Experiment::get_n方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: SECTION
double KroghModel_std2param::r_cap = 1;
double KroghModel_std2param::r_t = 100;
double KroghModel_std2param::p_cap;
double KroghModel_std2param::m;
double KroghModel_std3param::r_cap = 1;
double KroghModel_std3param::r_t;
double KroghModel_std3param::p_cap;
double KroghModel_std3param::m;
TEST_CASE( "MyExperiment", "[myexperiment]" ) {
SECTION("Read Data") {
string testfile = "271115_dataSetForTestingPurpose_r_t_100_a0_70_a1_0_001_N_33.dat";
Experiment my = Experiment(testfile);
REQUIRE(my.countElements("1 2 3") == 3);
REQUIRE(my.get_n("1") == 1);
REQUIRE(my.get_n("1 2 3") == 0);
REQUIRE(my.check_sigma("1 2") == false);
REQUIRE(my.check_sigma("1 2 3") == true);
}
}
TEST_CASE( "MyFit2param", "[myfit2param]" ) {
SECTION("parameters: a") {
string testfile = "271115_dataSetForTestingPurpose_r_t_100_a0_70_a1_0_001_N_33.dat";
Experiment myExp = Experiment(testfile);
Fitsvd myFit = Fitsvd(&KroghModel_std2param::funcs, myExp.x, myExp.y, myExp.sigma, 1e-12);
myFit.fit();
double eps = 1e-10;
double a0_below = (70.0-eps);
double a0_above = (70.0+eps);