Skip to content
Snippets Groups Projects
Commit 91ed6b07 authored by Elias Pipping's avatar Elias Pipping Committed by Elias Pipping
Browse files

Compare minima for the sample function

parent 80e57467
No related branches found
No related tags found
No related merge requests found
...@@ -60,7 +60,13 @@ void testSampleFunction() { ...@@ -60,7 +60,13 @@ void testSampleFunction() {
error -= returned; error -= returned;
assert(error.two_norm() < 1e-10); // FIXME: 1e-10 sounds reasonable. Is it? assert(error.two_norm() < 1e-10); // FIXME: 1e-10 sounds reasonable. Is it?
functionTester(J, start, 6); double const ret1 = functionTester(J, start, 6);
start[0] = 279;
start[1] = -96;
double const ret2 = functionTester(J, start, 10);
assert(std::abs(ret1 - ret2) < 1e-5);
} }
void testSampleFunctionNonsmooth() { void testSampleFunctionNonsmooth() {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment