mirror of
https://gitlab.com/libeigen/eigen.git
synced 2024-12-15 07:10:37 +08:00
clean fortran stuff in fdjac*
This commit is contained in:
parent
45442b8d41
commit
86cb9364c9
@ -6,9 +6,7 @@ int ei_fdjac1(
|
||||
Matrix< Scalar, Dynamic, 1 > &fvec,
|
||||
Matrix< Scalar, Dynamic, Dynamic > &fjac,
|
||||
int ml, int mu,
|
||||
Scalar epsfcn,
|
||||
Matrix< Scalar, Dynamic, 1 > &wa1,
|
||||
Matrix< Scalar, Dynamic, 1 > &wa2)
|
||||
Scalar epsfcn)
|
||||
{
|
||||
/* Local variables */
|
||||
Scalar h;
|
||||
@ -20,6 +18,9 @@ int ei_fdjac1(
|
||||
/* Function Body */
|
||||
const Scalar epsmch = epsilon<Scalar>();
|
||||
const int n = x.size();
|
||||
assert(fvec.size()==n);
|
||||
Matrix< Scalar, Dynamic, 1 > wa1(n);
|
||||
Matrix< Scalar, Dynamic, 1 > wa2(n);
|
||||
|
||||
eps = ei_sqrt((std::max(epsfcn,epsmch)));
|
||||
msum = ml + mu + 1;
|
||||
|
@ -5,8 +5,7 @@ int ei_fdjac2(
|
||||
Matrix< Scalar, Dynamic, 1 > &x,
|
||||
Matrix< Scalar, Dynamic, 1 > &fvec,
|
||||
Matrix< Scalar, Dynamic, Dynamic > &fjac,
|
||||
Scalar epsfcn,
|
||||
Matrix< Scalar, Dynamic, 1 > &wa)
|
||||
Scalar epsfcn)
|
||||
{
|
||||
/* Local variables */
|
||||
Scalar h, temp;
|
||||
@ -16,6 +15,7 @@ int ei_fdjac2(
|
||||
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];
|
||||
|
@ -93,7 +93,7 @@ int ei_hybrd(
|
||||
/* calculate the jacobian matrix. */
|
||||
|
||||
iflag = ei_fdjac1(Functor, x, fvec, fjac,
|
||||
nb_of_subdiagonals, nb_of_superdiagonals, epsfcn, wa1, wa2);
|
||||
nb_of_subdiagonals, nb_of_superdiagonals, epsfcn);
|
||||
nfev += msum;
|
||||
if (iflag < 0)
|
||||
break;
|
||||
|
@ -72,7 +72,7 @@ int ei_lmdif(
|
||||
|
||||
/* calculate the jacobian matrix. */
|
||||
|
||||
iflag = ei_fdjac2(Functor, x, fvec, fjac, epsfcn, wa4);
|
||||
iflag = ei_fdjac2(Functor, x, fvec, fjac, epsfcn);
|
||||
nfev += n;
|
||||
if (iflag < 0)
|
||||
break;
|
||||
|
Loading…
Reference in New Issue
Block a user