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

Method centralDifference

src/function.cpp:37–44  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

35}
36
37std::vector<double> Function::centralDifference(const std::vector<double> &x) const
38{
39 auto denseX = vectorToDenseVector(x);
40
41 auto dx = centralDifference(denseX);
42
43 return denseVectorToVector(dx);
44}
45
46std::vector<std::vector<double>> Function::secondOrderCentralDifference(const std::vector<double> &x) const
47{

Callers 1

compareJacobianValueFunction · 0.80

Calls 4

vectorToDenseVectorFunction · 0.85
centralDifferenceFunction · 0.85
denseVectorToVectorFunction · 0.85
getNumVariablesFunction · 0.50

Tested by 1

compareJacobianValueFunction · 0.64