MCPcopy Create free account
hub / github.com/bgrimstad/splinter / sampleTestFunction

Function sampleTestFunction

test/bsplinetestingutilities.cpp:17–42  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

15{
16
17DataTable sampleTestFunction()
18{
19 DataTable samples;
20
21 // Sample function
22 auto x0_vec = linspace(0,2,20);
23 auto x1_vec = linspace(0,2,20);
24 DenseVector x(2);
25 double y;
26
27 for (auto x0 : x0_vec)
28 {
29 for (auto x1 : x1_vec)
30 {
31 // Sample function at x
32 x(0) = x0;
33 x(1) = x1;
34 y = sixHumpCamelBack(x);
35
36 // Store sample
37 samples.addSample(x,y);
38 }
39 }
40
41 return samples;
42}
43
44bool testKnotInsertion()
45{

Callers 2

testKnotInsertionFunction · 0.85

Calls 3

sixHumpCamelBackFunction · 0.85
addSampleMethod · 0.80
linspaceFunction · 0.70

Tested by

no test coverage detected