lmder_functor Struct Reference
+ Inheritance diagram for lmder_functor:

Public Member Functions

 lmder_functor (void)
 
int operator() (const VectorXd &x, VectorXd &fvec) const
 
int df (const VectorXd &x, MatrixXd &fjac) const
 
 lmder_functor (void)
 
int operator() (const VectorXd &x, VectorXd &fvec) const
 
int df (const VectorXd &x, MatrixXd &fjac) const
 
- Public Member Functions inherited from Eigen::DenseFunctor< double >
 DenseFunctor ()
 
 DenseFunctor (int inputs, int values)
 
int inputs () const
 
int values () const
 
- Public Member Functions inherited from Functor< double >
 Functor ()
 
 Functor (int inputs, int values)
 
 Functor ()
 
 Functor (int inputs_, int values_)
 
int inputs () const
 
int inputs () const
 
int values () const
 
int values () const
 

Additional Inherited Members

- Public Types inherited from Eigen::DenseFunctor< double >
enum  
 
typedef double Scalar
 
typedef Matrix< Scalar, InputsAtCompileTime, 1 > InputType
 
typedef Matrix< Scalar, ValuesAtCompileTime, 1 > ValueType
 
typedef Matrix< Scalar, ValuesAtCompileTime, InputsAtCompileTimeJacobianType
 
typedef ColPivHouseholderQR< JacobianTypeQRSolver
 
- Public Types inherited from Functor< double >
enum  
 
enum  
 
typedef double Scalar
 
typedef double Scalar
 
typedef Matrix< Scalar, InputsAtCompileTime, 1 > InputType
 
typedef Matrix< Scalar, InputsAtCompileTime, 1 > InputType
 
typedef Matrix< Scalar, ValuesAtCompileTime, 1 > ValueType
 
typedef Matrix< Scalar, ValuesAtCompileTime, 1 > ValueType
 
typedef Matrix< Scalar, ValuesAtCompileTime, InputsAtCompileTimeJacobianType
 
typedef Matrix< Scalar, ValuesAtCompileTime, InputsAtCompileTimeJacobianType
 
- Public Attributes inherited from Eigen::DenseFunctor< double >
const int m_inputs
 
const int m_values
 
- Public Attributes inherited from Functor< double >
const int m_inputs
 
int m_inputs
 
const int m_values
 
int m_values
 

Constructor & Destructor Documentation

◆ lmder_functor() [1/2]

lmder_functor::lmder_functor ( void  )
inline

◆ lmder_functor() [2/2]

lmder_functor::lmder_functor ( void  )
inline

Member Function Documentation

◆ df() [1/2]

int lmder_functor::df ( const VectorXd &  x,
MatrixXd &  fjac 
) const
inline
43  {
44  double tmp1, tmp2, tmp3, tmp4;
45  for (int i = 0; i < values(); i++) {
46  tmp1 = i + 1;
47  tmp2 = 16 - i - 1;
48  tmp3 = (i >= 8) ? tmp2 : tmp1;
49  tmp4 = (x[1] * tmp2 + x[2] * tmp3);
50  tmp4 = tmp4 * tmp4;
51  fjac(i, 0) = -1;
52  fjac(i, 1) = tmp1 * tmp2 / tmp4;
53  fjac(i, 2) = tmp1 * tmp3 / tmp4;
54  }
55  return 0;
56  }
int i
Definition: BiCGSTAB_step_by_step.cpp:9
list x
Definition: plotDoE.py:28
int values() const
Definition: LevenbergMarquardt/LevenbergMarquardt.h:57

References i, Eigen::DenseFunctor< double >::values(), and plotDoE::x.

◆ df() [2/2]

int lmder_functor::df ( const VectorXd &  x,
MatrixXd &  fjac 
) const
inline
132  {
133  double tmp1, tmp2, tmp3, tmp4;
134  for (int i = 0; i < values(); i++) {
135  tmp1 = i + 1;
136  tmp2 = 16 - i - 1;
137  tmp3 = (i >= 8) ? tmp2 : tmp1;
138  tmp4 = (x[1] * tmp2 + x[2] * tmp3);
139  tmp4 = tmp4 * tmp4;
140  fjac(i, 0) = -1;
141  fjac(i, 1) = tmp1 * tmp2 / tmp4;
142  fjac(i, 2) = tmp1 * tmp3 / tmp4;
143  }
144  return 0;
145  }

References i, Eigen::DenseFunctor< double >::values(), and plotDoE::x.

◆ operator()() [1/2]

int lmder_functor::operator() ( const VectorXd &  x,
VectorXd &  fvec 
) const
inline
29  {
30  double tmp1, tmp2, tmp3;
31  static const double y[15] = {1.4e-1, 1.8e-1, 2.2e-1, 2.5e-1, 2.9e-1, 3.2e-1, 3.5e-1, 3.9e-1,
32  3.7e-1, 5.8e-1, 7.3e-1, 9.6e-1, 1.34, 2.1, 4.39};
33 
34  for (int i = 0; i < values(); i++) {
35  tmp1 = i + 1;
36  tmp2 = 16 - i - 1;
37  tmp3 = (i >= 8) ? tmp2 : tmp1;
38  fvec[i] = y[i] - (x[0] + tmp1 / (x[1] * tmp2 + x[2] * tmp3));
39  }
40  return 0;
41  }
Scalar * y
Definition: level1_cplx_impl.h:128

References i, Eigen::DenseFunctor< double >::values(), plotDoE::x, and y.

◆ operator()() [2/2]

int lmder_functor::operator() ( const VectorXd &  x,
VectorXd &  fvec 
) const
inline
118  {
119  double tmp1, tmp2, tmp3;
120  static const double y[15] = {1.4e-1, 1.8e-1, 2.2e-1, 2.5e-1, 2.9e-1, 3.2e-1, 3.5e-1, 3.9e-1,
121  3.7e-1, 5.8e-1, 7.3e-1, 9.6e-1, 1.34, 2.1, 4.39};
122 
123  for (int i = 0; i < values(); i++) {
124  tmp1 = i + 1;
125  tmp2 = 16 - i - 1;
126  tmp3 = (i >= 8) ? tmp2 : tmp1;
127  fvec[i] = y[i] - (x[0] + tmp1 / (x[1] * tmp2 + x[2] * tmp3));
128  }
129  return 0;
130  }

References i, Eigen::DenseFunctor< double >::values(), plotDoE::x, and y.


The documentation for this struct was generated from the following files: