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