Skip to content
Snippets Groups Projects
Commit 633b153a authored by Kevin Höllring's avatar Kevin Höllring
Browse files

Give diff_precision more fitting name

parent 8dda6192
Branches
No related tags found
No related merge requests found
...@@ -20,8 +20,8 @@ TEST_CASE("Minimization via conjugated gradient method on functions with " ...@@ -20,8 +20,8 @@ TEST_CASE("Minimization via conjugated gradient method on functions with "
using std::cout; using std::cout;
using std::endl; using std::endl;
FivePointDifferentiator fp; FivePointDifferentiator fp;
double step = 1e-6; double diff_precision = 1e-6;
ConjugateGradient optimizer(fp, step); ConjugateGradient optimizer(fp, diff_precision);
Coordinate<double> position1(1), position2(2), ref2(2), res1(1), res2(2); Coordinate<double> position1(1), position2(2), ref2(2), res1(1), res2(2);
......
...@@ -20,7 +20,8 @@ TEST_CASE("Gradient Descent on functions with multi-dimensional argument", ...@@ -20,7 +20,8 @@ TEST_CASE("Gradient Descent on functions with multi-dimensional argument",
using std::endl; using std::endl;
FivePointDifferentiator fp; FivePointDifferentiator fp;
double step = 1e-4; double step = 1e-4;
GradientDescent optimizer(fp, step); double diff_precision = 1e-6;
GradientDescent optimizer(fp, step, diff_precision);
Coordinate<double> position1(1), position2(2), ref2(2), res1(1), res2(2); Coordinate<double> position1(1), position2(2), ref2(2), res1(1), res2(2);
......
...@@ -20,8 +20,8 @@ TEST_CASE("Minimization via gradient root finding on functions with " ...@@ -20,8 +20,8 @@ TEST_CASE("Minimization via gradient root finding on functions with "
using std::cout; using std::cout;
using std::endl; using std::endl;
FivePointDifferentiator fp; FivePointDifferentiator fp;
double step = 1e-6; double diff_precision = 1e-6;
GradientRootfinder optimizer(fp, step); GradientRootfinder optimizer(fp, diff_precision);
Coordinate<double> position1(1), position2(2), ref2(2), res1(1), res2(2); Coordinate<double> position1(1), position2(2), ref2(2), res1(1), res2(2);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment