1 #define chkder_log10e 0.43429448190325182765 2 #define chkder_factor 100. 8 template<
typename Scalar>
30 const Index m = fvec.size(), n = x.size();
35 for (Index j = 0; j < n; ++j) {
36 temp = eps *
abs(x[j]);
45 for (Index j = 0; j < n; ++j) {
49 err += temp * fjac.col(j);
51 for (Index i = 0; i < m; ++i) {
53 if (fvec[i] != 0. && fvecp[i] != 0. &&
abs(fvecp[i] - fvec[i]) >= epsf *
abs(fvec[i]))
54 temp = eps *
abs((fvecp[i] - fvec[i]) / eps - err[i]) / (
abs(fvec[i]) +
abs(fvecp[i]));
56 if (temp > NumTraits<Scalar>::epsilon() && temp < eps)
IntermediateState sqrt(const Expression &arg)
iterative scaling algorithm to equilibrate rows and column norms in matrices
Holds information about the various numeric (i.e. scalar) types allowed by Eigen. ...
EIGEN_STRONG_INLINE const CwiseUnaryOp< internal::scalar_abs_op< Scalar >, const Derived > abs() const
EIGEN_STRONG_INLINE void resize(Index nbRows, Index nbCols)
Derived & setZero(Index size)
EIGEN_DEFAULT_DENSE_INDEX_TYPE DenseIndex
void chkder(const Matrix< Scalar, Dynamic, 1 > &x, const Matrix< Scalar, Dynamic, 1 > &fvec, const Matrix< Scalar, Dynamic, Dynamic > &fjac, Matrix< Scalar, Dynamic, 1 > &xp, const Matrix< Scalar, Dynamic, 1 > &fvecp, int mode, Matrix< Scalar, Dynamic, 1 > &err)
IntermediateState log(const Expression &arg)