misra1a_functor Struct Reference
+ Inheritance diagram for misra1a_functor:

Public Member Functions

 misra1a_functor (void)
 
int operator() (const VectorXd &b, VectorXd &fvec)
 
int df (const VectorXd &b, MatrixXd &fjac)
 
 misra1a_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 m_x [14]
 
static const double m_y [14]
 

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

◆ misra1a_functor() [1/2]

misra1a_functor::misra1a_functor ( void  )
inline

◆ misra1a_functor() [2/2]

misra1a_functor::misra1a_functor ( void  )
inline

Member Function Documentation

◆ df() [1/2]

int misra1a_functor::df ( const VectorXd &  b,
MatrixXd &  fjac 
)
inline
336  {
337  assert(b.size() == 2);
338  assert(fjac.rows() == 14);
339  assert(fjac.cols() == 2);
340  for (int i = 0; i < 14; i++) {
341  fjac(i, 0) = (1. - exp(-b[1] * m_x[i]));
342  fjac(i, 1) = (b[0] * m_x[i] * exp(-b[1] * m_x[i]));
343  }
344  return 0;
345  }
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 m_x[14]
Definition: levenberg_marquardt.cpp:326

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

◆ df() [2/2]

int misra1a_functor::df ( const VectorXd &  b,
MatrixXd &  fjac 
)
inline
679  {
680  assert(b.size() == 2);
681  assert(fjac.rows() == 14);
682  assert(fjac.cols() == 2);
683  for (int i = 0; i < 14; i++) {
684  fjac(i, 0) = (1. - exp(-b[1] * m_x[i]));
685  fjac(i, 1) = (b[0] * m_x[i] * exp(-b[1] * m_x[i]));
686  }
687  return 0;
688  }

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

◆ operator()() [1/2]

int misra1a_functor::operator() ( const VectorXd &  b,
VectorXd &  fvec 
)
inline
328  {
329  assert(b.size() == 2);
330  assert(fvec.size() == 14);
331  for (int i = 0; i < 14; i++) {
332  fvec[i] = b[0] * (1. - exp(-b[1] * m_x[i])) - m_y[i];
333  }
334  return 0;
335  }
static const double m_y[14]
Definition: levenberg_marquardt.cpp:327

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

◆ operator()() [2/2]

int misra1a_functor::operator() ( const VectorXd &  b,
VectorXd &  fvec 
)
inline
671  {
672  assert(b.size() == 2);
673  assert(fvec.size() == 14);
674  for (int i = 0; i < 14; i++) {
675  fvec[i] = b[0] * (1. - exp(-b[1] * m_x[i])) - m_y[i];
676  }
677  return 0;
678  }

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

Member Data Documentation

◆ m_x

const double misra1a_functor::m_x
static
Initial value:
= {77.6E0, 114.9E0, 141.1E0, 190.8E0, 239.9E0, 289.0E0, 332.8E0,
378.4E0, 434.8E0, 477.3E0, 536.8E0, 593.1E0, 689.1E0, 760.0E0}

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

◆ m_y

const double misra1a_functor::m_y
static
Initial value:
= {10.07E0, 14.73E0, 17.94E0, 23.93E0, 29.61E0, 35.18E0, 40.02E0,
44.82E0, 50.76E0, 55.05E0, 61.01E0, 66.40E0, 75.47E0, 81.78E0}

Referenced by operator()().


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