MCPcopy Create free account
hub / github.com/abess-team/abess / test_central

Function test_central

python/include/unsupported/test/NumericalDiff.cpp:91–108  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

89}
90
91void test_central()
92{
93 VectorXd x(3);
94 MatrixXd jac(15,3);
95 MatrixXd actual_jac(15,3);
96 my_functor functor;
97
98 x << 0.082, 1.13, 2.35;
99
100 // real one
101 functor.actual_df(x, actual_jac);
102
103 // using NumericalDiff
104 NumericalDiff<my_functor,Central> numDiff(functor);
105 numDiff.df(x, jac);
106
107 VERIFY_IS_APPROX(jac, actual_jac);
108}
109
110void test_NumericalDiff()
111{

Callers 1

test_NumericalDiffFunction · 0.85

Calls 2

actual_dfMethod · 0.80
dfMethod · 0.45

Tested by

no test coverage detected