mirror of
https://gitlab.com/libeigen/eigen.git
synced 2025-08-14 04:35:57 +08:00
iwa is not really an argument, but just an old fashioned 'work array' :
remove it from the eigen API
This commit is contained in:
parent
b423e640a6
commit
8d2f6ad7e1
@ -250,17 +250,16 @@ template<typename Functor, typename Scalar>
|
||||
int ei_lmdif1(
|
||||
Matrix< Scalar, Dynamic, 1 > &x,
|
||||
Matrix< Scalar, Dynamic, 1 > &fvec,
|
||||
VectorXi &iwa,
|
||||
Scalar tol = ei_sqrt(epsilon<Scalar>())
|
||||
)
|
||||
{
|
||||
int n = x.size();
|
||||
int ldfjac = fvec.size();
|
||||
int lwa = ldfjac*n+5*n+ldfjac;
|
||||
VectorXi iwa(n);
|
||||
Matrix< Scalar, Dynamic, 1 > wa(lwa);
|
||||
Matrix< Scalar, Dynamic, Dynamic > fjac(ldfjac, n);
|
||||
|
||||
iwa.resize(n);
|
||||
wa.resize(lwa);
|
||||
return lmdif1_template<Scalar> (
|
||||
Functor::f, 0,
|
||||
|
@ -681,13 +681,12 @@ void testLmdif1()
|
||||
int m=15, n=3, info;
|
||||
|
||||
VectorXd x(n), fvec(m);
|
||||
VectorXi iwa;
|
||||
|
||||
/* the following starting values provide a rough fit. */
|
||||
x.setConstant(n, 1.);
|
||||
|
||||
// do the computation
|
||||
info = ei_lmdif1<lmdif1_functor,double>(x, fvec, iwa);
|
||||
info = ei_lmdif1<lmdif1_functor,double>(x, fvec);
|
||||
|
||||
// check return value
|
||||
VERIFY( 1 == info);
|
||||
|
Loading…
x
Reference in New Issue
Block a user