MGH10_functor Struct Reference
+ Inheritance diagram for MGH10_functor:

Public Member Functions

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

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

◆ MGH10_functor() [1/2]

MGH10_functor::MGH10_functor ( void  )
inline

◆ MGH10_functor() [2/2]

MGH10_functor::MGH10_functor ( void  )
inline

Member Function Documentation

◆ df() [1/2]

int MGH10_functor::df ( const VectorXd &  b,
MatrixXd &  fjac 
)
inline
794  {
795  assert(b.size() == 3);
796  assert(fjac.rows() == 16);
797  assert(fjac.cols() == 3);
798  for (int i = 0; i < 16; i++) {
799  double factor = 1. / (x[i] + b[2]);
800  double e = exp(b[1] * factor);
801  fjac(i, 0) = e;
802  fjac(i, 1) = b[0] * factor * e;
803  fjac(i, 2) = -b[1] * b[0] * factor * factor * e;
804  }
805  return 0;
806  }
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[16]
Definition: levenberg_marquardt.cpp:786

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

◆ df() [2/2]

int MGH10_functor::df ( const VectorXd &  b,
MatrixXd &  fjac 
)
inline
1129  {
1130  assert(b.size() == 3);
1131  assert(fjac.rows() == 16);
1132  assert(fjac.cols() == 3);
1133  for (int i = 0; i < 16; i++) {
1134  double factor = 1. / (x[i] + b[2]);
1135  double e = exp(b[1] * factor);
1136  fjac(i, 0) = e;
1137  fjac(i, 1) = b[0] * factor * e;
1138  fjac(i, 2) = -b[1] * b[0] * factor * factor * e;
1139  }
1140  return 0;
1141  }

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

◆ operator()() [1/2]

int MGH10_functor::operator() ( const VectorXd &  b,
VectorXd &  fvec 
)
inline
788  {
789  assert(b.size() == 3);
790  assert(fvec.size() == 16);
791  for (int i = 0; i < 16; i++) fvec[i] = b[0] * exp(b[1] / (x[i] + b[2])) - y[i];
792  return 0;
793  }
static const double y[16]
Definition: levenberg_marquardt.cpp:787

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

◆ operator()() [2/2]

int MGH10_functor::operator() ( const VectorXd &  b,
VectorXd &  fvec 
)
inline
1123  {
1124  assert(b.size() == 3);
1125  assert(fvec.size() == 16);
1126  for (int i = 0; i < 16; i++) fvec[i] = b[0] * exp(b[1] / (x[i] + b[2])) - y[i];
1127  return 0;
1128  }

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

Member Data Documentation

◆ x

const double MGH10_functor::x
static
Initial value:
= {5.000000E+01, 5.500000E+01, 6.000000E+01, 6.500000E+01, 7.000000E+01, 7.500000E+01,
8.000000E+01, 8.500000E+01, 9.000000E+01, 9.500000E+01, 1.000000E+02, 1.050000E+02,
1.100000E+02, 1.150000E+02, 1.200000E+02, 1.250000E+02}

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

◆ y

const double MGH10_functor::y
static
Initial value:
= {3.478000E+04, 2.861000E+04, 2.365000E+04, 1.963000E+04, 1.637000E+04, 1.372000E+04,
1.154000E+04, 9.744000E+03, 8.261000E+03, 7.030000E+03, 6.005000E+03, 5.147000E+03,
4.427000E+03, 3.820000E+03, 3.307000E+03, 2.872000E+03}

Referenced by operator()().


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