| 89 | } |
| 90 | |
| 91 | void 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 | |
| 110 | void test_NumericalDiff() |
| 111 | { |
no test coverage detected