hybrd_functor Struct Reference
+ Inheritance diagram for hybrd_functor:

Public Member Functions

 hybrd_functor (void)
 
int operator() (const VectorXd &x, VectorXd &fvec) 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
 

Additional Inherited Members

- 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 Functor< double >
const int m_inputs
 
int m_inputs
 
const int m_values
 
int m_values
 

Constructor & Destructor Documentation

◆ hybrd_functor()

hybrd_functor::hybrd_functor ( void  )
inline

Member Function Documentation

◆ operator()()

int hybrd_functor::operator() ( const VectorXd &  x,
VectorXd &  fvec 
) const
inline
309  {
310  double temp, temp1, temp2;
311  const VectorXd::Index n = x.size();
312 
313  assert(fvec.size() == n);
314  for (VectorXd::Index k = 0; k < n; k++) {
315  temp = (3. - 2. * x[k]) * x[k];
316  temp1 = 0.;
317  if (k) temp1 = x[k - 1];
318  temp2 = 0.;
319  if (k != n - 1) temp2 = x[k + 1];
320  fvec[k] = temp - temp1 - 2. * temp2 + 1.;
321  }
322  return 0;
323  }
const unsigned n
Definition: CG3DPackingUnitTest.cpp:11
#define assert(e,...)
Definition: Logger.h:744
char char char int int * k
Definition: level2_impl.h:374
EIGEN_DEFAULT_DENSE_INDEX_TYPE Index
The Index type as used for the API.
Definition: Meta.h:83
list x
Definition: plotDoE.py:28

References assert, k, n, and plotDoE::x.


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