mirror of
https://gitlab.com/libeigen/eigen.git
synced 2025-06-04 18:54:00 +08:00
be sure that there's no name clash between NumericalDiff::df and the
original functor df()
This commit is contained in:
parent
7968737247
commit
977ed615a6
@ -50,7 +50,7 @@ struct my_functor : Functor<double>
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
int df(const VectorXd &x, MatrixXd &fjac) const
|
int actual_df(const VectorXd &x, MatrixXd &fjac) const
|
||||||
{
|
{
|
||||||
double tmp1, tmp2, tmp3, tmp4;
|
double tmp1, tmp2, tmp3, tmp4;
|
||||||
for (int i = 0; i < values(); i++)
|
for (int i = 0; i < values(); i++)
|
||||||
@ -77,7 +77,7 @@ void test_forward()
|
|||||||
x << 0.082, 1.13, 2.35;
|
x << 0.082, 1.13, 2.35;
|
||||||
|
|
||||||
// real one
|
// real one
|
||||||
functor.df(x, actual_jac);
|
functor.actual_df(x, actual_jac);
|
||||||
// std::cout << actual_jac << std::endl << std::endl;
|
// std::cout << actual_jac << std::endl << std::endl;
|
||||||
|
|
||||||
// using NumericalDiff
|
// using NumericalDiff
|
||||||
@ -98,7 +98,7 @@ void test_central()
|
|||||||
x << 0.082, 1.13, 2.35;
|
x << 0.082, 1.13, 2.35;
|
||||||
|
|
||||||
// real one
|
// real one
|
||||||
functor.df(x, actual_jac);
|
functor.actual_df(x, actual_jac);
|
||||||
|
|
||||||
// using NumericalDiff
|
// using NumericalDiff
|
||||||
NumericalDiff<my_functor,Central> numDiff(functor);
|
NumericalDiff<my_functor,Central> numDiff(functor);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user