mirror of
https://gitlab.com/libeigen/eigen.git
synced 2025-08-05 11:40:40 +08:00
fdjac2 is not needed anymore
This commit is contained in:
parent
d3850641a1
commit
d912034565
@ -45,7 +45,6 @@ namespace Eigen {
|
|||||||
#include "src/NonLinear/r1mpyq.h"
|
#include "src/NonLinear/r1mpyq.h"
|
||||||
#include "src/NonLinear/rwupdt.h"
|
#include "src/NonLinear/rwupdt.h"
|
||||||
#include "src/NonLinear/qrfac.h"
|
#include "src/NonLinear/qrfac.h"
|
||||||
#include "src/NonLinear/fdjac2.h"
|
|
||||||
#include "src/NonLinear/fdjac1.h"
|
#include "src/NonLinear/fdjac1.h"
|
||||||
#include "src/NonLinear/qform.h"
|
#include "src/NonLinear/qform.h"
|
||||||
#include "src/NonLinear/lmpar.h"
|
#include "src/NonLinear/lmpar.h"
|
||||||
|
@ -1,35 +0,0 @@
|
|||||||
|
|
||||||
template<typename FunctorType, typename Scalar>
|
|
||||||
int ei_fdjac2(
|
|
||||||
const FunctorType &Functor,
|
|
||||||
Matrix< Scalar, Dynamic, 1 > &x,
|
|
||||||
Matrix< Scalar, Dynamic, 1 > &fvec,
|
|
||||||
Matrix< Scalar, Dynamic, Dynamic > &fjac,
|
|
||||||
Scalar epsfcn)
|
|
||||||
{
|
|
||||||
/* Local variables */
|
|
||||||
Scalar h, temp;
|
|
||||||
int iflag;
|
|
||||||
|
|
||||||
/* Function Body */
|
|
||||||
const Scalar epsmch = epsilon<Scalar>();
|
|
||||||
const int n = x.size();
|
|
||||||
const Scalar eps = ei_sqrt((std::max(epsfcn,epsmch)));
|
|
||||||
Matrix< Scalar, Dynamic, 1 > wa(fvec.size());
|
|
||||||
|
|
||||||
for (int j = 0; j < n; ++j) {
|
|
||||||
temp = x[j];
|
|
||||||
h = eps * ei_abs(temp);
|
|
||||||
if (h == 0.) {
|
|
||||||
h = eps;
|
|
||||||
}
|
|
||||||
x[j] = temp + h;
|
|
||||||
iflag = Functor(x, wa);
|
|
||||||
if (iflag < 0)
|
|
||||||
return iflag;
|
|
||||||
x[j] = temp;
|
|
||||||
fjac.col(j) = (wa-fvec)/h;
|
|
||||||
}
|
|
||||||
return iflag;
|
|
||||||
}
|
|
||||||
|
|
Loading…
x
Reference in New Issue
Block a user