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 );
An abstract base class to help FunctionBase objects perform some operations.
virtual const std::vector< int > & getFixedFlags() const
Returns the flags indicating which parameters should remain fixed during any minimization process...
virtual void resize()
Re-sizes the appropriate vectors maintained in this base class.
virtual const std::vector< std::string > & parmNames() const
Returns a reference to a vector of parameter names.
std::vector< int > m_fixed_flags
The flags to indicated which parameters are to be held fixed during minimization of this objective fu...
virtual double integrate(double lower_limit, double upper_limit) const
Returns the integral of the function from the lower limit to the higher limit.
hippodraw::FunctionBase class interface
std::vector< std::string > m_parm_names
The names of the function parameters.
virtual void initialParameters(const FunctionHelper *helper)
Sets the FunctionHelper so that the function can calculate a reasonable set of initial parameter valu...
std::vector< double > m_parms
The parameter values.
virtual int count()
Returns 0.
virtual FunctionBase * clone() const
Creates a new function object by copying an existing one.
virtual double operator()(double x) const
The function call operator.
const std::string & name() const
Returns the name of the function.
virtual unsigned int dimensions() const
Returns the number of dimensions of the data coordinate.
virtual void removeFromComposite(FunctionBase *)
Does nothing.
virtual bool hasDerivatives() const
Returns true if function can calculate its partial derivatives.
virtual ~FunctionBase()
The virtual destructor.
void setParmNames(const std::vector< std::string > &names)
Sets the names of the parameters.
virtual void addToComposite(FunctionBase *)
Does nothing.
virtual void initialize()
Initializes the function and parameter names.
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...
void setName(const char *)
Sets the name of the function.
virtual const std::vector< double > & getParameters() const
Returns the values of the parameters as a vector.
std::string m_name
The name of the function.
virtual void setParameters(const std::vector< double > &incr)
Sets the parameter values.
virtual int size() const
Returns the number of parameters.
FunctionBase()
The default constructor.
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...
virtual bool isComposite() const
Returns false.
A function that can be added to a DataRep and used in a fitter.