5 template<
typename FunctorType,
typename Scalar>
29 const Index n = x.size();
38 for (j = 0; j < n; ++j) {
44 iflag = Functor(x, wa1);
48 fjac.col(j) = (wa1-fvec)/h;
53 for (k = 0; k < msum; ++k) {
54 for (j = k; (msum<0) ? (j>n): (j<n); j += msum) {
56 h = eps *
abs(wa2[j]);
60 iflag = Functor(x, wa1);
63 for (j = k; (msum<0) ? (j>n): (j<n); j += msum) {
65 h = eps *
abs(wa2[j]);
68 start = std::max<Index>(0,j-mu);
69 length = (std::min)(n-1, j+ml) - start + 1;
70 fjac.col(j).segment(start, length) = ( wa1.segment(start, length)-fvec.segment(start, length))/h;
EIGEN_DEVICE_FUNC Derived & setZero(Index size)
EIGEN_DEVICE_FUNC const SqrtReturnType sqrt() const
Holds information about the various numeric (i.e. scalar) types allowed by Eigen. ...
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const AbsReturnType abs() const
EIGEN_STRONG_INLINE EIGEN_DEVICE_FUNC half() max(const half &a, const half &b)
EIGEN_DEFAULT_DENSE_INDEX_TYPE Index
The Index type as used for the API.
EIGEN_DEFAULT_DENSE_INDEX_TYPE DenseIndex
TFSIMD_FORCE_INLINE tfScalar length(const Quaternion &q)
DenseIndex fdjac1(const FunctorType &Functor, Matrix< Scalar, Dynamic, 1 > &x, Matrix< Scalar, Dynamic, 1 > &fvec, Matrix< Scalar, Dynamic, Dynamic > &fjac, DenseIndex ml, DenseIndex mu, Scalar epsfcn)