mirror of
https://gitlab.com/libeigen/eigen.git
synced 2025-03-01 18:26:24 +08:00
machine_epsilon is now called epsilon in latest eigen
This commit is contained in:
parent
47ac354190
commit
3093e92da5
@ -29,7 +29,7 @@ template<typename Functor, typename Scalar>
|
||||
int ei_hybrd1(
|
||||
Eigen::Matrix< Scalar, Eigen::Dynamic, 1 > &x,
|
||||
Eigen::Matrix< Scalar, Eigen::Dynamic, 1 > &fvec,
|
||||
Scalar tol = Eigen::ei_sqrt(Eigen::machine_epsilon<Scalar>())
|
||||
Scalar tol = Eigen::ei_sqrt(Eigen::epsilon<Scalar>())
|
||||
)
|
||||
{
|
||||
int lwa = (x.size()*(3*x.size()+13))/2;
|
||||
@ -53,7 +53,7 @@ int ei_hybrd(
|
||||
int nb_of_superdiagonals = -1,
|
||||
int maxfev = 2000,
|
||||
Scalar factor = Scalar(100.),
|
||||
Scalar xtol = Eigen::ei_sqrt(Eigen::machine_epsilon<Scalar>()),
|
||||
Scalar xtol = Eigen::ei_sqrt(Eigen::epsilon<Scalar>()),
|
||||
Scalar epsfcn = Scalar(0.),
|
||||
int nprint=0
|
||||
)
|
||||
@ -93,7 +93,7 @@ int ei_hybrj1(
|
||||
Eigen::Matrix< Scalar, Eigen::Dynamic, 1 > &x,
|
||||
Eigen::Matrix< Scalar, Eigen::Dynamic, 1 > &fvec,
|
||||
Eigen::Matrix< Scalar, Eigen::Dynamic, Eigen::Dynamic > &fjac,
|
||||
Scalar tol = Eigen::ei_sqrt(Eigen::machine_epsilon<Scalar>())
|
||||
Scalar tol = Eigen::ei_sqrt(Eigen::epsilon<Scalar>())
|
||||
)
|
||||
{
|
||||
int n = x.size();
|
||||
@ -120,7 +120,7 @@ int ei_hybrj(
|
||||
int mode=1,
|
||||
int maxfev = 1000,
|
||||
Scalar factor = Scalar(100.),
|
||||
Scalar xtol = Eigen::ei_sqrt(Eigen::machine_epsilon<Scalar>()),
|
||||
Scalar xtol = Eigen::ei_sqrt(Eigen::epsilon<Scalar>()),
|
||||
int nprint=0
|
||||
)
|
||||
{
|
||||
@ -154,7 +154,7 @@ int ei_lmstr1(
|
||||
Eigen::Matrix< Scalar, Eigen::Dynamic, 1 > &x,
|
||||
Eigen::Matrix< Scalar, Eigen::Dynamic, 1 > &fvec,
|
||||
VectorXi &ipvt,
|
||||
Scalar tol = Eigen::ei_sqrt(Eigen::machine_epsilon<Scalar>())
|
||||
Scalar tol = Eigen::ei_sqrt(Eigen::epsilon<Scalar>())
|
||||
)
|
||||
{
|
||||
int lwa = 5*x.size()+fvec.size();
|
||||
@ -185,8 +185,8 @@ int ei_lmstr(
|
||||
int mode=1,
|
||||
double factor = 100.,
|
||||
int maxfev = 400,
|
||||
Scalar ftol = Eigen::ei_sqrt(Eigen::machine_epsilon<Scalar>()),
|
||||
Scalar xtol = Eigen::ei_sqrt(Eigen::machine_epsilon<Scalar>()),
|
||||
Scalar ftol = Eigen::ei_sqrt(Eigen::epsilon<Scalar>()),
|
||||
Scalar xtol = Eigen::ei_sqrt(Eigen::epsilon<Scalar>()),
|
||||
Scalar gtol = Scalar(0.),
|
||||
int nprint=0
|
||||
)
|
||||
@ -223,7 +223,7 @@ int ei_lmder1(
|
||||
Eigen::Matrix< Scalar, Eigen::Dynamic, 1 > &x,
|
||||
Eigen::Matrix< Scalar, Eigen::Dynamic, 1 > &fvec,
|
||||
VectorXi &ipvt,
|
||||
Scalar tol = Eigen::ei_sqrt(Eigen::machine_epsilon<Scalar>())
|
||||
Scalar tol = Eigen::ei_sqrt(Eigen::epsilon<Scalar>())
|
||||
)
|
||||
{
|
||||
int lwa = 5*x.size()+fvec.size();
|
||||
@ -254,8 +254,8 @@ int ei_lmder(
|
||||
int mode=1,
|
||||
double factor = 100.,
|
||||
int maxfev = 400,
|
||||
Scalar ftol = Eigen::ei_sqrt(Eigen::machine_epsilon<Scalar>()),
|
||||
Scalar xtol = Eigen::ei_sqrt(Eigen::machine_epsilon<Scalar>()),
|
||||
Scalar ftol = Eigen::ei_sqrt(Eigen::epsilon<Scalar>()),
|
||||
Scalar xtol = Eigen::ei_sqrt(Eigen::epsilon<Scalar>()),
|
||||
Scalar gtol = Scalar(0.),
|
||||
int nprint=0
|
||||
)
|
||||
@ -296,8 +296,8 @@ int ei_lmdif(
|
||||
int mode=1,
|
||||
double factor = 100.,
|
||||
int maxfev = 400,
|
||||
Scalar ftol = Eigen::ei_sqrt(Eigen::machine_epsilon<Scalar>()),
|
||||
Scalar xtol = Eigen::ei_sqrt(Eigen::machine_epsilon<Scalar>()),
|
||||
Scalar ftol = Eigen::ei_sqrt(Eigen::epsilon<Scalar>()),
|
||||
Scalar xtol = Eigen::ei_sqrt(Eigen::epsilon<Scalar>()),
|
||||
Scalar gtol = Scalar(0.),
|
||||
Scalar epsfcn = Scalar(0.),
|
||||
int nprint=0
|
||||
@ -334,7 +334,7 @@ int ei_lmdif1(
|
||||
Eigen::Matrix< Scalar, Eigen::Dynamic, 1 > &x,
|
||||
Eigen::Matrix< Scalar, Eigen::Dynamic, 1 > &fvec,
|
||||
VectorXi &iwa,
|
||||
Scalar tol = Eigen::ei_sqrt(Eigen::machine_epsilon<Scalar>())
|
||||
Scalar tol = Eigen::ei_sqrt(Eigen::epsilon<Scalar>())
|
||||
)
|
||||
{
|
||||
int n = x.size();
|
||||
|
@ -843,7 +843,7 @@ void testNistChwirut2(void)
|
||||
x<< 0.15, 0.008, 0.010;
|
||||
// do the computation
|
||||
info = ei_lmder<chwirut2_functor, double>(x, fvec, nfev, njev, fjac, ipvt, diag,
|
||||
1, 100., 400, 1.E6*Eigen::machine_epsilon<double>(), 1.E6*Eigen::machine_epsilon<double>());
|
||||
1, 100., 400, 1.E6*Eigen::epsilon<double>(), 1.E6*Eigen::epsilon<double>());
|
||||
|
||||
// check return value
|
||||
VERIFY( 1 == info);
|
||||
@ -1366,7 +1366,7 @@ void testNistBoxBOD(void)
|
||||
x<< 1., 1.;
|
||||
// do the computation
|
||||
info = ei_lmder<BoxBOD_functor, double>(x, fvec, nfev, njev, fjac, ipvt, diag,
|
||||
1, 10., 400, 1E6*Eigen::machine_epsilon<double>(), 1E6*Eigen::machine_epsilon<double>());
|
||||
1, 10., 400, 1E6*Eigen::epsilon<double>(), 1E6*Eigen::epsilon<double>());
|
||||
|
||||
// check return value
|
||||
VERIFY( 1 == info);
|
||||
@ -1384,7 +1384,7 @@ void testNistBoxBOD(void)
|
||||
x<< 100., 0.75;
|
||||
// do the computation
|
||||
info = ei_lmder<BoxBOD_functor, double>(x, fvec, nfev, njev, fjac, ipvt, diag,
|
||||
1, 100., 14000, Eigen::machine_epsilon<double>(), Eigen::machine_epsilon<double>());
|
||||
1, 100., 14000, Eigen::epsilon<double>(), Eigen::epsilon<double>());
|
||||
|
||||
// check return value
|
||||
VERIFY( 1 == info);
|
||||
@ -1443,7 +1443,7 @@ void testNistMGH17(void)
|
||||
// do the computation
|
||||
info = ei_lmder<MGH17_functor, double>(
|
||||
x, fvec, nfev, njev, fjac, ipvt, diag,
|
||||
1, 100., 5000, Eigen::machine_epsilon<double>(), Eigen::machine_epsilon<double>());
|
||||
1, 100., 5000, Eigen::epsilon<double>(), Eigen::epsilon<double>());
|
||||
|
||||
// check return value
|
||||
VERIFY( 2 == info);
|
||||
@ -1527,7 +1527,7 @@ void testNistMGH09(void)
|
||||
// do the computation
|
||||
info = ei_lmder<MGH09_functor, double>(x, fvec, nfev, njev, fjac, ipvt, diag,
|
||||
1, 100., 5000);
|
||||
// 1, 100., 5000, Eigen::machine_epsilon<double>(), Eigen::machine_epsilon<double>());
|
||||
// 1, 100., 5000, Eigen::epsilon<double>(), Eigen::epsilon<double>());
|
||||
|
||||
// check return value
|
||||
VERIFY( 1 == info);
|
||||
@ -1689,7 +1689,7 @@ void testNistThurber(void)
|
||||
x<< 1000 ,1000 ,400 ,40 ,0.7,0.3,0.0 ;
|
||||
// do the computation
|
||||
info = ei_lmder<thurber_functor, double>(x, fvec, nfev, njev, fjac, ipvt, diag,
|
||||
1, 100., 400, 1.E4*Eigen::machine_epsilon<double>(), 1.E4*Eigen::machine_epsilon<double>());
|
||||
1, 100., 400, 1.E4*Eigen::epsilon<double>(), 1.E4*Eigen::epsilon<double>());
|
||||
|
||||
// check return value
|
||||
VERIFY( 1 == info);
|
||||
@ -1712,7 +1712,7 @@ void testNistThurber(void)
|
||||
x<< 1300 ,1500 ,500 ,75 ,1 ,0.4 ,0.05 ;
|
||||
// do the computation
|
||||
info = ei_lmder<thurber_functor, double>(x, fvec, nfev, njev, fjac, ipvt, diag,
|
||||
1, 100., 400, 1.E4*Eigen::machine_epsilon<double>(), 1.E4*Eigen::machine_epsilon<double>());
|
||||
1, 100., 400, 1.E4*Eigen::epsilon<double>(), 1.E4*Eigen::epsilon<double>());
|
||||
|
||||
// check return value
|
||||
VERIFY( 1 == info);
|
||||
@ -1775,7 +1775,7 @@ void testNistRat43(void)
|
||||
x<< 100., 10., 1., 1.;
|
||||
// do the computation
|
||||
info = ei_lmder<rat43_functor, double>(x, fvec, nfev, njev, fjac, ipvt, diag,
|
||||
1, 100., 400, 1.E6*Eigen::machine_epsilon<double>(), 1.E6*Eigen::machine_epsilon<double>());
|
||||
1, 100., 400, 1.E6*Eigen::epsilon<double>(), 1.E6*Eigen::epsilon<double>());
|
||||
|
||||
// check return value
|
||||
VERIFY( 1 == info);
|
||||
@ -1795,7 +1795,7 @@ void testNistRat43(void)
|
||||
x<< 700., 5., 0.75, 1.3;
|
||||
// do the computation
|
||||
info = ei_lmder<rat43_functor, double>(x, fvec, nfev, njev, fjac, ipvt, diag,
|
||||
1, 100., 400, 1.E5*Eigen::machine_epsilon<double>(), 1.E5*Eigen::machine_epsilon<double>());
|
||||
1, 100., 400, 1.E5*Eigen::epsilon<double>(), 1.E5*Eigen::epsilon<double>());
|
||||
|
||||
// check return value
|
||||
VERIFY( 1 == info);
|
||||
|
Loading…
Reference in New Issue
Block a user