9 #include <boost/test/data/test_case.hpp>
10 #include <boost/test/tools/output_test_stream.hpp>
11 #include <boost/test/unit_test.hpp>
21 std::vector<double> temperatures{64., 16., 4., 2., 1.5, 1.};
30 double chi2 = config.
cutOff + 3.14;
33 double previousWeight = 1.;
35 std::cout <<
"Check weight decrease:" << std::endl;
36 for (
auto temp : temperatures) {
39 bool hasDecreased = weight < previousWeight;
41 BOOST_CHECK(hasDecreased);
44 annealingTool.
anneal(state);
46 std::cout <<
"\tTemperature: " << temp <<
", weight: " << weight
62 chi2 = config.
cutOff - 3.14;
67 std::cout <<
"Check weight increase:" << std::endl;
68 for (
auto temp : temperatures) {
71 bool hasIncreased = weight > previousWeight;
73 BOOST_CHECK(hasIncreased);
76 annealingTool.
anneal(state);
78 std::cout <<
"\tTemperature: " << temp <<
", weight: " << weight
93 std::cout <<
"Check weight insensitivity:" << std::endl;
94 for (
auto temp : temperatures) {
97 bool hasNotChanged = weight == previousWeight;
99 BOOST_CHECK(hasNotChanged);
102 annealingTool.
anneal(state);
104 std::cout <<
"\tTemperature: " << temp <<
", weight: " << weight
111 std::vector<double> allChi2{1.3, 4.5, 8.4, 0.4, 10.3, 12.3,
112 3.5, 5.8, 11.0, 1.1, 3.5, 6.7};
114 std::vector<double> temperatures{64., 16., 4., 2., 1.5, 1.};
123 double chi2 = config.
cutOff + 5.;
126 double previousWeight = 1.;
128 std::cout <<
"Check weight decrease:" << std::endl;
129 for (
auto temp : temperatures) {
132 bool hasDecreased = weight < previousWeight;
134 BOOST_CHECK(hasDecreased);
137 annealingTool.
anneal(state);
139 std::cout <<
"\tTemperature: " << temp <<
", weight: " << weight
160 std::cout <<
"Check weight increase:" << std::endl;
161 for (
auto temp : temperatures) {
164 bool hasIncreased = weight > previousWeight;
166 BOOST_CHECK(hasIncreased);
169 annealingTool.
anneal(state);
171 std::cout <<
"\tTemperature: " << temp <<
", weight: " << weight