eckerle4_functor Struct Reference
+ Inheritance diagram for eckerle4_functor:

Public Member Functions

 eckerle4_functor (void)
 
int operator() (const VectorXd &b, VectorXd &fvec)
 
int df (const VectorXd &b, MatrixXd &fjac)
 
 eckerle4_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 [35]
 
static const double y [35]
 

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

◆ eckerle4_functor() [1/2]

eckerle4_functor::eckerle4_functor ( void  )
inline

◆ eckerle4_functor() [2/2]

eckerle4_functor::eckerle4_functor ( void  )
inline

Member Function Documentation

◆ df() [1/2]

int eckerle4_functor::df ( const VectorXd &  b,
MatrixXd &  fjac 
)
inline
1455  {
1456  assert(b.size() == 3);
1457  assert(fjac.rows() == 35);
1458  assert(fjac.cols() == 3);
1459  for (int i = 0; i < 35; i++) {
1460  double b12 = b[1] * b[1];
1461  double e = exp(-0.5 * (x[i] - b[2]) * (x[i] - b[2]) / b12);
1462  fjac(i, 0) = e / b[1];
1463  fjac(i, 1) = ((x[i] - b[2]) * (x[i] - b[2]) / b12 - 1.) * b[0] * e / b12;
1464  fjac(i, 2) = (x[i] - b[2]) * e * b[0] / b[1] / b12;
1465  }
1466  return 0;
1467  }
int i
Definition: BiCGSTAB_step_by_step.cpp:9
Array< double, 1, 3 > e(1./3., 0.5, 2.)
#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[35]
Definition: levenberg_marquardt.cpp:1446

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

◆ df() [2/2]

int eckerle4_functor::df ( const VectorXd &  b,
MatrixXd &  fjac 
)
inline
1754  {
1755  assert(b.size() == 3);
1756  assert(fjac.rows() == 35);
1757  assert(fjac.cols() == 3);
1758  for (int i = 0; i < 35; i++) {
1759  double b12 = b[1] * b[1];
1760  double e = exp(-0.5 * (x[i] - b[2]) * (x[i] - b[2]) / b12);
1761  fjac(i, 0) = e / b[1];
1762  fjac(i, 1) = ((x[i] - b[2]) * (x[i] - b[2]) / b12 - 1.) * b[0] * e / b12;
1763  fjac(i, 2) = (x[i] - b[2]) * e * b[0] / b[1] / b12;
1764  }
1765  return 0;
1766  }

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

◆ operator()() [1/2]

int eckerle4_functor::operator() ( const VectorXd &  b,
VectorXd &  fvec 
)
inline
1448  {
1449  assert(b.size() == 3);
1450  assert(fvec.size() == 35);
1451  for (int i = 0; i < 35; i++)
1452  fvec[i] = b[0] / b[1] * exp(-0.5 * (x[i] - b[2]) * (x[i] - b[2]) / (b[1] * b[1])) - y[i];
1453  return 0;
1454  }
static const double y[35]
Definition: levenberg_marquardt.cpp:1447

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

◆ operator()() [2/2]

int eckerle4_functor::operator() ( const VectorXd &  b,
VectorXd &  fvec 
)
inline
1747  {
1748  assert(b.size() == 3);
1749  assert(fvec.size() == 35);
1750  for (int i = 0; i < 35; i++)
1751  fvec[i] = b[0] / b[1] * exp(-0.5 * (x[i] - b[2]) * (x[i] - b[2]) / (b[1] * b[1])) - y[i];
1752  return 0;
1753  }

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

Member Data Documentation

◆ x

const double eckerle4_functor::x
static
Initial value:
= {400.0, 405.0, 410.0, 415.0, 420.0, 425.0, 430.0, 435.0, 436.5,
438.0, 439.5, 441.0, 442.5, 444.0, 445.5, 447.0, 448.5, 450.0,
451.5, 453.0, 454.5, 456.0, 457.5, 459.0, 460.5, 462.0, 463.5,
465.0, 470.0, 475.0, 480.0, 485.0, 490.0, 495.0, 500.0}

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

◆ y

const double eckerle4_functor::y
static
Initial value:
= {0.0001575, 0.0001699, 0.0002350, 0.0003102, 0.0004917, 0.0008710, 0.0017418,
0.0046400, 0.0065895, 0.0097302, 0.0149002, 0.0237310, 0.0401683, 0.0712559,
0.1264458, 0.2073413, 0.2902366, 0.3445623, 0.3698049, 0.3668534, 0.3106727,
0.2078154, 0.1164354, 0.0616764, 0.0337200, 0.0194023, 0.0117831, 0.0074357,
0.0022732, 0.0008800, 0.0004579, 0.0002345, 0.0001586, 0.0001143, 0.0000710}

Referenced by operator()().


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