MGH17_functor Struct Reference
+ Inheritance diagram for MGH17_functor:

Public Member Functions

 MGH17_functor (void)
 
int operator() (const VectorXd &b, VectorXd &fvec)
 
int df (const VectorXd &b, MatrixXd &fjac)
 
 MGH17_functor (void)
 
int operator() (const VectorXd &b, VectorXd &fvec)
 
int df (const VectorXd &b, MatrixXd &fjac)
 
- 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
 

Static Public Attributes

static const double x [33]
 
static const double y [33]
 

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

◆ MGH17_functor() [1/2]

MGH17_functor::MGH17_functor ( void  )
inline

◆ MGH17_functor() [2/2]

MGH17_functor::MGH17_functor ( void  )
inline

Member Function Documentation

◆ df() [1/2]

int MGH17_functor::df ( const VectorXd &  b,
MatrixXd &  fjac 
)
inline
971  {
972  assert(b.size() == 5);
973  assert(fjac.rows() == 33);
974  assert(fjac.cols() == 5);
975  for (int i = 0; i < 33; i++) {
976  fjac(i, 0) = 1.;
977  fjac(i, 1) = exp(-b[3] * x[i]);
978  fjac(i, 2) = exp(-b[4] * x[i]);
979  fjac(i, 3) = -x[i] * b[1] * exp(-b[3] * x[i]);
980  fjac(i, 4) = -x[i] * b[2] * exp(-b[4] * x[i]);
981  }
982  return 0;
983  }
int i
Definition: BiCGSTAB_step_by_step.cpp:9
#define assert(e,...)
Definition: Logger.h:744
Scalar * b
Definition: benchVecAdd.cpp:17
EIGEN_STRONG_INLINE EIGEN_DEVICE_FUNC bfloat16 exp(const bfloat16 &a)
Definition: BFloat16.h:615
static const double x[33]
Definition: levenberg_marquardt.cpp:963

References assert, b, Eigen::bfloat16_impl::exp(), i, and x.

◆ df() [2/2]

int MGH17_functor::df ( const VectorXd &  b,
MatrixXd &  fjac 
)
inline
1280  {
1281  assert(b.size() == 5);
1282  assert(fjac.rows() == 33);
1283  assert(fjac.cols() == 5);
1284  for (int i = 0; i < 33; i++) {
1285  fjac(i, 0) = 1.;
1286  fjac(i, 1) = exp(-b[3] * x[i]);
1287  fjac(i, 2) = exp(-b[4] * x[i]);
1288  fjac(i, 3) = -x[i] * b[1] * exp(-b[3] * x[i]);
1289  fjac(i, 4) = -x[i] * b[2] * exp(-b[4] * x[i]);
1290  }
1291  return 0;
1292  }

References assert, b, Eigen::bfloat16_impl::exp(), i, and x.

◆ operator()() [1/2]

int MGH17_functor::operator() ( const VectorXd &  b,
VectorXd &  fvec 
)
inline
965  {
966  assert(b.size() == 5);
967  assert(fvec.size() == 33);
968  for (int i = 0; i < 33; i++) fvec[i] = b[0] + b[1] * exp(-b[3] * x[i]) + b[2] * exp(-b[4] * x[i]) - y[i];
969  return 0;
970  }
static const double y[33]
Definition: levenberg_marquardt.cpp:964

References assert, b, Eigen::bfloat16_impl::exp(), i, x, and y.

◆ operator()() [2/2]

int MGH17_functor::operator() ( const VectorXd &  b,
VectorXd &  fvec 
)
inline
1274  {
1275  assert(b.size() == 5);
1276  assert(fvec.size() == 33);
1277  for (int i = 0; i < 33; i++) fvec[i] = b[0] + b[1] * exp(-b[3] * x[i]) + b[2] * exp(-b[4] * x[i]) - y[i];
1278  return 0;
1279  }

References assert, b, Eigen::bfloat16_impl::exp(), i, x, and y.

Member Data Documentation

◆ x

const double MGH17_functor::x
static
Initial value:
= {0.000000E+00, 1.000000E+01, 2.000000E+01, 3.000000E+01, 4.000000E+01, 5.000000E+01,
6.000000E+01, 7.000000E+01, 8.000000E+01, 9.000000E+01, 1.000000E+02, 1.100000E+02,
1.200000E+02, 1.300000E+02, 1.400000E+02, 1.500000E+02, 1.600000E+02, 1.700000E+02,
1.800000E+02, 1.900000E+02, 2.000000E+02, 2.100000E+02, 2.200000E+02, 2.300000E+02,
2.400000E+02, 2.500000E+02, 2.600000E+02, 2.700000E+02, 2.800000E+02, 2.900000E+02,
3.000000E+02, 3.100000E+02, 3.200000E+02}

Referenced by df(), and operator()().

◆ y

const double MGH17_functor::y
static
Initial value:
= {8.440000E-01, 9.080000E-01, 9.320000E-01, 9.360000E-01, 9.250000E-01, 9.080000E-01,
8.810000E-01, 8.500000E-01, 8.180000E-01, 7.840000E-01, 7.510000E-01, 7.180000E-01,
6.850000E-01, 6.580000E-01, 6.280000E-01, 6.030000E-01, 5.800000E-01, 5.580000E-01,
5.380000E-01, 5.220000E-01, 5.060000E-01, 4.900000E-01, 4.780000E-01, 4.670000E-01,
4.570000E-01, 4.480000E-01, 4.380000E-01, 4.310000E-01, 4.240000E-01, 4.200000E-01,
4.140000E-01, 4.110000E-01, 4.060000E-01}

Referenced by operator()().


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