mirror of
https://gitlab.com/libeigen/eigen.git
synced 2025-01-30 17:40:05 +08:00
16061a46db
used by those algorithms (aka "second level"). This is a row import : we copy/paste the files from cminpack and make very few changes : * template<Scalar> them (replace double) * dpmpar() replaced by c++ standard equivalent * abs/fabs/sqrt/min/max replaced by ei_* or std::* * use eigen norms instead of enorm() Important Notes: * The use of stableNorm() was not enough in some cases, but using blueNorm() instead fixed the problems (some tests gave bad results, either in number of iterations or precision of the results) * As a whole, the only test that changed is testNistMGH17() : it now takes some few steps less to get the same result. So this is a small improvement. After this commit, the only remaining dependency from the cminpack static library is 'covar', only used from the tests.
84 lines
2.8 KiB
Plaintext
84 lines
2.8 KiB
Plaintext
// This file is part of Eigen, a lightweight C++ template library
|
|
// for linear algebra.
|
|
//
|
|
// Copyright (C) 2009 Thomas Capricelli <orzel@freehackers.org>
|
|
//
|
|
// Eigen is free software; you can redistribute it and/or
|
|
// modify it under the terms of the GNU Lesser General Public
|
|
// License as published by the Free Software Foundation; either
|
|
// version 3 of the License, or (at your option) any later version.
|
|
//
|
|
// Alternatively, you can redistribute it and/or
|
|
// modify it under the terms of the GNU General Public License as
|
|
// published by the Free Software Foundation; either version 2 of
|
|
// the License, or (at your option) any later version.
|
|
//
|
|
// Eigen is distributed in the hope that it will be useful, but WITHOUT ANY
|
|
// WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
|
// FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License or the
|
|
// GNU General Public License for more details.
|
|
//
|
|
// You should have received a copy of the GNU Lesser General Public
|
|
// License and a copy of the GNU General Public License along with
|
|
// Eigen. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
|
|
#ifndef EIGEN_NONLINEAR_MODULE_H
|
|
#define EIGEN_NONLINEAR_MODULE_H
|
|
|
|
#include <Eigen/Core>
|
|
|
|
namespace Eigen {
|
|
|
|
/** \ingroup Unsupported_modules
|
|
* \defgroup Support for non linear optimization and non linear least
|
|
* square using minpack routines.
|
|
*/
|
|
//@{
|
|
|
|
#if 1
|
|
#include <cminpack.h>
|
|
#else
|
|
|
|
/* Declarations for minpack */
|
|
typedef int (*minpack_func_nn)(void *p, int n, const double *x, double *fvec, int iflag );
|
|
typedef int (*minpack_funcder_nn)(void *p, int n, const double *x, double *fvec, double *fjac, int ldfjac, int iflag );
|
|
typedef int (*minpack_func_mn)(void *p, int m, int n, const double *x, double *fvec, int iflag );
|
|
typedef int (*minpack_funcder_mn)(void *p, int m, int n, const double *x, double *fvec, double *fjac, int ldfjac, int iflag );
|
|
typedef int (*minpack_funcderstr_mn)(void *p, int m, int n, const double *x, double *fvec, double *fjrow, int iflag );
|
|
|
|
void covar(int n, double *r__, int ldr, const int *ipvt, double tol, double *wa);
|
|
#endif
|
|
|
|
#include "src/NonLinear/qrsolv.h"
|
|
#include "src/NonLinear/r1updt.h"
|
|
#include "src/NonLinear/r1mpyq.h"
|
|
#include "src/NonLinear/rwupdt.h"
|
|
#include "src/NonLinear/qrfac.h"
|
|
#include "src/NonLinear/fdjac2.h"
|
|
#include "src/NonLinear/fdjac1.h"
|
|
#include "src/NonLinear/qform.h"
|
|
#include "src/NonLinear/lmpar.h"
|
|
#include "src/NonLinear/dogleg.h"
|
|
#include "src/NonLinear/covar.h"
|
|
|
|
#include "src/NonLinear/lmder.h"
|
|
#include "src/NonLinear/hybrd.h"
|
|
#include "src/NonLinear/lmstr.h"
|
|
#include "src/NonLinear/lmdif.h"
|
|
#include "src/NonLinear/hybrj.h"
|
|
#include "src/NonLinear/lmder1.h"
|
|
#include "src/NonLinear/lmstr1.h"
|
|
#include "src/NonLinear/hybrd1.h"
|
|
#include "src/NonLinear/hybrj1.h"
|
|
#include "src/NonLinear/lmdif1.h"
|
|
#include "src/NonLinear/chkder.h"
|
|
|
|
//@}
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif // EIGEN_NONLINEAR_MODULE_H
|