MCPcopy Create free account
hub / github.com/davisking/dlib / test_poly_min_extract_2nd

Function test_poly_min_extract_2nd

dlib/test/optimization.cpp:1179–1193  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1177 }
1178
1179 void test_poly_min_extract_2nd()
1180 {
1181 double off;
1182
1183 off = 0.0; DLIB_TEST(std::abs( poly_min_extrap(off*off, -2*off, (1-off)*(1-off)) - off) < 1e-13);
1184 off = 0.1; DLIB_TEST(std::abs( poly_min_extrap(off*off, -2*off, (1-off)*(1-off)) - off) < 1e-13);
1185 off = 0.2; DLIB_TEST(std::abs( poly_min_extrap(off*off, -2*off, (1-off)*(1-off)) - off) < 1e-13);
1186 off = 0.3; DLIB_TEST(std::abs( poly_min_extrap(off*off, -2*off, (1-off)*(1-off)) - off) < 1e-13);
1187 off = 0.4; DLIB_TEST(std::abs( poly_min_extrap(off*off, -2*off, (1-off)*(1-off)) - off) < 1e-13);
1188 off = 0.5; DLIB_TEST(std::abs( poly_min_extrap(off*off, -2*off, (1-off)*(1-off)) - off) < 1e-13);
1189 off = 0.6; DLIB_TEST(std::abs( poly_min_extrap(off*off, -2*off, (1-off)*(1-off)) - off) < 1e-13);
1190 off = 0.8; DLIB_TEST(std::abs( poly_min_extrap(off*off, -2*off, (1-off)*(1-off)) - off) < 1e-13);
1191 off = 0.9; DLIB_TEST(std::abs( poly_min_extrap(off*off, -2*off, (1-off)*(1-off)) - off) < 1e-13);
1192 off = 1.0; DLIB_TEST(std::abs( poly_min_extrap(off*off, -2*off, (1-off)*(1-off)) - off) < 1e-13);
1193 }
1194
1195 void test_solve_trust_region_subproblem_bounded()
1196 {

Callers 1

perform_testMethod · 0.85

Calls 2

absFunction · 0.85
poly_min_extrapFunction · 0.85

Tested by

no test coverage detected