3 #include <cgv/math/vec.h>
14 template <
typename X,
typename T>
32 static X epsilon = (X)1e-5;
33 static X inv_2_eps = (X)(0.5/epsilon);
34 unsigned n = p.
size();
37 for (
unsigned i=0; i<n; ++i) {
51 template <
typename X,
typename T>
61 template <
typename X,
typename T>
cgv::math::vec< X > vec_type
vectors must have get_nr_independent_variables() components
Definition: mfunc.h:21
cgv::math::vec< X > pnt_type
points must have get_nr_independent_variables() components
Definition: mfunc.h:19
A column vector class.
Definition: fvec.h:13
unsigned size() const
number of elements
Definition: vec.h:97
unsigned int get_nr_independent_variables() const
returns 2
Definition: mfunc.h:56
virtual unsigned get_nr_independent_variables() const =0
return the number of independent variables that are mapped by the function
virtual ~mfunc()
virtual destructor
Definition: mfunc.h:23
virtual T evaluate(const pnt_type &p) const =0
interface for evaluation of the multivariate function
the cgv namespace
Definition: vr_calib.cxx:9
virtual vec_type evaluate_gradient(const pnt_type &p) const
Definition: mfunc.h:31
unsigned int get_nr_independent_variables() const
returns 3
Definition: mfunc.h:66