Bennett5_functor Struct Reference
+ Inheritance diagram for Bennett5_functor:

Public Member Functions

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

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

◆ Bennett5_functor() [1/2]

Bennett5_functor::Bennett5_functor ( void  )
inline

◆ Bennett5_functor() [2/2]

Bennett5_functor::Bennett5_functor ( void  )
inline
1446 : Functor<double>(3, 154) {}

Member Function Documentation

◆ df() [1/2]

int Bennett5_functor::df ( const VectorXd &  b,
MatrixXd &  fjac 
)
inline
1150  {
1151  assert(b.size() == 3);
1152  assert(fjac.rows() == 154);
1153  assert(fjac.cols() == 3);
1154  for (int i = 0; i < 154; i++) {
1155  double e = pow(b[1] + x[i], -1. / b[2]);
1156  fjac(i, 0) = e;
1157  fjac(i, 1) = -b[0] * e / b[2] / (b[1] + x[i]);
1158  fjac(i, 2) = b[0] * e * log(b[1] + x[i]) / b[2] / b[2];
1159  }
1160  return 0;
1161  }
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 pow(const bfloat16 &a, const bfloat16 &b)
Definition: BFloat16.h:625
EIGEN_STRONG_INLINE EIGEN_DEVICE_FUNC bfloat16 log(const bfloat16 &a)
Definition: BFloat16.h:618
static const double x[154]
Definition: levenberg_marquardt.cpp:1142

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

◆ df() [2/2]

int Bennett5_functor::df ( const VectorXd &  b,
MatrixXd &  fjac 
)
inline
1455  {
1456  assert(b.size() == 3);
1457  assert(fjac.rows() == 154);
1458  assert(fjac.cols() == 3);
1459  for (int i = 0; i < 154; i++) {
1460  double e = pow(b[1] + x[i], -1. / b[2]);
1461  fjac(i, 0) = e;
1462  fjac(i, 1) = -b[0] * e / b[2] / (b[1] + x[i]);
1463  fjac(i, 2) = b[0] * e * log(b[1] + x[i]) / b[2] / b[2];
1464  }
1465  return 0;
1466  }

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

◆ operator()() [1/2]

int Bennett5_functor::operator() ( const VectorXd &  b,
VectorXd &  fvec 
)
inline
1144  {
1145  assert(b.size() == 3);
1146  assert(fvec.size() == 154);
1147  for (int i = 0; i < 154; i++) fvec[i] = b[0] * pow(b[1] + x[i], -1. / b[2]) - y[i];
1148  return 0;
1149  }
static const double y[154]
Definition: levenberg_marquardt.cpp:1143

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

◆ operator()() [2/2]

int Bennett5_functor::operator() ( const VectorXd &  b,
VectorXd &  fvec 
)
inline
1449  {
1450  assert(b.size() == 3);
1451  assert(fvec.size() == 154);
1452  for (int i = 0; i < 154; i++) fvec[i] = b[0] * pow(b[1] + x[i], -1. / b[2]) - y[i];
1453  return 0;
1454  }

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

Member Data Documentation

◆ x

const double Bennett5_functor::x
static
Initial value:
= {
7.447168E0, 8.102586E0, 8.452547E0, 8.711278E0, 8.916774E0, 9.087155E0, 9.232590E0, 9.359535E0, 9.472166E0,
9.573384E0, 9.665293E0, 9.749461E0, 9.827092E0, 9.899128E0, 9.966321E0, 10.029280E0, 10.088510E0, 10.144430E0,
10.197380E0, 10.247670E0, 10.295560E0, 10.341250E0, 10.384950E0, 10.426820E0, 10.467000E0, 10.505640E0, 10.542830E0,
10.578690E0, 10.613310E0, 10.646780E0, 10.679150E0, 10.710520E0, 10.740920E0, 10.770440E0, 10.799100E0, 10.826970E0,
10.854080E0, 10.880470E0, 10.906190E0, 10.931260E0, 10.955720E0, 10.979590E0, 11.002910E0, 11.025700E0, 11.047980E0,
11.069770E0, 11.091100E0, 11.111980E0, 11.132440E0, 11.152480E0, 11.172130E0, 11.191410E0, 11.210310E0, 11.228870E0,
11.247090E0, 11.264980E0, 11.282560E0, 11.299840E0, 11.316820E0, 11.333520E0, 11.349940E0, 11.366100E0, 11.382000E0,
11.397660E0, 11.413070E0, 11.428240E0, 11.443200E0, 11.457930E0, 11.472440E0, 11.486750E0, 11.500860E0, 11.514770E0,
11.528490E0, 11.542020E0, 11.555380E0, 11.568550E0, 11.581560E0, 11.594420E0, 11.607121E0, 11.619640E0, 11.632000E0,
11.644210E0, 11.656280E0, 11.668200E0, 11.679980E0, 11.691620E0, 11.703130E0, 11.714510E0, 11.725760E0, 11.736880E0,
11.747890E0, 11.758780E0, 11.769550E0, 11.780200E0, 11.790730E0, 11.801160E0, 11.811480E0, 11.821700E0, 11.831810E0,
11.841820E0, 11.851730E0, 11.861550E0, 11.871270E0, 11.880890E0, 11.890420E0, 11.899870E0, 11.909220E0, 11.918490E0,
11.927680E0, 11.936780E0, 11.945790E0, 11.954730E0, 11.963590E0, 11.972370E0, 11.981070E0, 11.989700E0, 11.998260E0,
12.006740E0, 12.015150E0, 12.023490E0, 12.031760E0, 12.039970E0, 12.048100E0, 12.056170E0, 12.064180E0, 12.072120E0,
12.080010E0, 12.087820E0, 12.095580E0, 12.103280E0, 12.110920E0, 12.118500E0, 12.126030E0, 12.133500E0, 12.140910E0,
12.148270E0, 12.155570E0, 12.162830E0, 12.170030E0, 12.177170E0, 12.184270E0, 12.191320E0, 12.198320E0, 12.205270E0,
12.212170E0, 12.219030E0, 12.225840E0, 12.232600E0, 12.239320E0, 12.245990E0, 12.252620E0, 12.259200E0, 12.265750E0,
12.272240E0}

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

◆ y

const double Bennett5_functor::y
static
Initial value:
= {
-34.834702E0, -34.393200E0, -34.152901E0, -33.979099E0, -33.845901E0, -33.732899E0, -33.640301E0, -33.559200E0,
-33.486801E0, -33.423100E0, -33.365101E0, -33.313000E0, -33.260899E0, -33.217400E0, -33.176899E0, -33.139198E0,
-33.101601E0, -33.066799E0, -33.035000E0, -33.003101E0, -32.971298E0, -32.942299E0, -32.916302E0, -32.890202E0,
-32.864101E0, -32.841000E0, -32.817799E0, -32.797501E0, -32.774300E0, -32.757000E0, -32.733799E0, -32.716400E0,
-32.699100E0, -32.678799E0, -32.661400E0, -32.644001E0, -32.626701E0, -32.612202E0, -32.597698E0, -32.583199E0,
-32.568699E0, -32.554298E0, -32.539799E0, -32.525299E0, -32.510799E0, -32.499199E0, -32.487598E0, -32.473202E0,
-32.461601E0, -32.435501E0, -32.435501E0, -32.426800E0, -32.412300E0, -32.400799E0, -32.392101E0, -32.380501E0,
-32.366001E0, -32.357300E0, -32.348598E0, -32.339901E0, -32.328400E0, -32.319698E0, -32.311001E0, -32.299400E0,
-32.290699E0, -32.282001E0, -32.273300E0, -32.264599E0, -32.256001E0, -32.247299E0, -32.238602E0, -32.229900E0,
-32.224098E0, -32.215401E0, -32.203800E0, -32.198002E0, -32.189400E0, -32.183601E0, -32.174900E0, -32.169102E0,
-32.163300E0, -32.154598E0, -32.145901E0, -32.140099E0, -32.131401E0, -32.125599E0, -32.119801E0, -32.111198E0,
-32.105400E0, -32.096699E0, -32.090900E0, -32.088001E0, -32.079300E0, -32.073502E0, -32.067699E0, -32.061901E0,
-32.056099E0, -32.050301E0, -32.044498E0, -32.038799E0, -32.033001E0, -32.027199E0, -32.024300E0, -32.018501E0,
-32.012699E0, -32.004002E0, -32.001099E0, -31.995300E0, -31.989500E0, -31.983700E0, -31.977900E0, -31.972099E0,
-31.969299E0, -31.963501E0, -31.957701E0, -31.951900E0, -31.946100E0, -31.940300E0, -31.937401E0, -31.931601E0,
-31.925800E0, -31.922899E0, -31.917101E0, -31.911301E0, -31.908400E0, -31.902599E0, -31.896900E0, -31.893999E0,
-31.888201E0, -31.885300E0, -31.882401E0, -31.876600E0, -31.873699E0, -31.867901E0, -31.862101E0, -31.859200E0,
-31.856300E0, -31.850500E0, -31.844700E0, -31.841801E0, -31.838900E0, -31.833099E0, -31.830200E0, -31.827299E0,
-31.821600E0, -31.818701E0, -31.812901E0, -31.809999E0, -31.807100E0, -31.801300E0, -31.798401E0, -31.795500E0,
-31.789700E0, -31.786800E0}

Referenced by operator()().


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