14 #include "msdevstudio/MSconfig.h"
40 : m_name ( fb.m_name ),
41 m_parm_names ( fb.m_parm_names ),
42 m_parms ( fb.m_parms ),
43 m_fixed_flags ( fb.m_fixed_flags )
104 const vector < int > &
115 vector < int > :: const_iterator it = flags.begin ();
123 vector< double >::const_iterator it = incr.begin ();
127 vector < double > ::const_iterator
132 for (
unsigned int i = 0; i <
size; i++ ) {
139 vector < int > ::const_iterator
145 for (
unsigned int i = 0; i <
size; i++ ) {
168 double h = (b - a)/n;
172 for(
int i = 1; i <= n - 1; i++ )
210 assert ( v.size () == 1 );
void setParmNames(const std::vector< std::string > &names)
Sets the names of the parameters.
virtual void setFixedFlags(const std::vector< int > &flags)
Sets to flags indicating that a function parameter is to be held fixed in a minimization process...
virtual void initialParameters(const FunctionHelper *helper)
Sets the FunctionHelper so that the function can calculate a reasonable set of initial parameter valu...
virtual bool hasDerivatives() const
Returns true if function can calculate its partial derivatives.
virtual void addToComposite(FunctionBase *)
Does nothing.
virtual int size() const
Returns the number of parameters.
virtual double integrate(double lower_limit, double upper_limit) const
Returns the integral of the function from the lower limit to the higher limit.
const std::string & name() const
Returns the name of the function.
virtual const std::vector< std::string > & parmNames() const
Returns a reference to a vector of parameter names.
virtual void removeFromComposite(FunctionBase *)
Does nothing.
hippodraw::FunctionBase class interface
virtual ~FunctionBase()
The virtual destructor.
FunctionBase()
The default constructor.
virtual int count()
Returns 0.
virtual bool isComposite() const
Returns false.
std::string m_name
The name of the function.
virtual const std::vector< int > & getFixedFlags() const
Returns the flags indicating which parameters should remain fixed during any minimization process...
virtual unsigned int dimensions() const
Returns the number of dimensions of the data coordinate.
virtual void resize()
Re-sizes the appropriate vectors maintained in this base class.
virtual void setParameters(const std::vector< double > &incr)
Sets the parameter values.
virtual const std::vector< double > & getParameters() const
Returns the values of the parameters as a vector.
std::vector< int > m_fixed_flags
The flags to indicated which parameters are to be held fixed during minimization of this objective fu...
std::vector< double > m_parms
The parameter values.
std::vector< std::string > m_parm_names
The names of the function parameters.
virtual FunctionBase * clone() const
Creates a new function object by copying an existing one.
A function that can be added to a DataRep and used in a fitter.
virtual void initialize()
Initializes the function and parameter names.
An abstract base class to help FunctionBase objects perform some operations.
virtual double operator()(double x) const
The function call operator.
void setName(const char *)
Sets the name of the function.
virtual double derivByParm(int i, double x) const
Returns the function's derivative at the coordinate value x with respect to the i-th parameter...