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