Class MEAL::Function
-
class Function : public Reference::Able
Pure virtual base class of all functions.
A Function may consist of an arbitrary number of parameters. Using the Abscissa class, a Function may also be constrained by one or more independent variables. The specification of the Function base class promotes its use with the LevenbergMarquardt template class.
Subclassed by MEAL::Evaluable< std::complex< double > >, MEAL::Evaluable< Jones< double > >, MEAL::Evaluable< Matrix< 4, 4, std::complex< double > > >, MEAL::Evaluable< Matrix< 4, 4, double > >, MEAL::Evaluable< double >, MEAL::Evaluable< Vector< 2, std::complex< double > > >, MEAL::Evaluable< Vector< 3, double > >, MEAL::Evaluable< T >, MEAL::Null
Public Types
Public Functions
-
Function()
Default constructor.
-
virtual ~Function()
Virtual destructor.
-
virtual TextInterface::Parser *get_interface()
Return a text interface that can be used to access this instance.
-
virtual void parse(const std::string &text)
Parses the values of model parameters and fit flags from a string.
-
virtual void print(std::string &text) const
Prints the values of model parameters and fit flags to a string.
-
virtual std::string get_name() const = 0
Return the name of the class.
-
inline virtual std::string get_description() const
Return the description of the class.
-
inline unsigned get_nparam() const
Return the number of parameters.
-
inline std::string get_param_name(unsigned index) const
Return the name of the specified parameter.
-
inline std::string get_param_description(unsigned index) const
Return the description of the specified parameter.
-
inline double get_param(unsigned index) const
Return the value of the specified parameter.
-
inline void set_param(unsigned index, double value)
Set the value of the specified parameter.
-
inline double get_variance(unsigned index) const
Return the variance of the specified parameter.
-
inline void set_variance(unsigned index, double value)
Set the variance of the specified parameter.
-
inline bool get_infit(unsigned index) const
Return true if parameter at index is to be fitted.
-
inline void set_infit(unsigned index, bool flag)
Set flag for parameter at index to be fitted.
-
inline void set_argument(unsigned dimension, Argument *axis)
Set the independent variable of the specified dimension.
-
Estimate<double> get_Estimate(unsigned index) const
Return an Estimate of the specified parameter.
-
void set_Estimate(unsigned index, const Estimate<double> ¶m)
Set the Estimate of the specified parameter.
-
void set_verbose(bool)
Set the verbosity of this instance.
-
bool get_verbose() const
Get the verbosity of this instance.
-
inline const ParameterPolicy *get_parameter_policy() const
Provide access to the parameter_policy attribute.
-
inline ParameterPolicy *get_parameter_policy()
Provide access to the parameter_policy attribute.
-
inline bool has_parameter_policy() const
Some wrappers may not have a parameter policy.
-
virtual void print_parameters(std::string &text, const std::string &separator) const
Prints the values of model parameters and fit flags to a string.
Public Members
Public Static Functions
-
template<class Model>
static Model *load(const std::string &filename) Construct a new Model instance from a file.
Public Static Attributes
-
static bool verbose
Verbosity flag.
-
static bool very_verbose
Low-level verbosity flag.
-
static bool check_zero
When set, some Functions will throw an Error if they evaluate to zero.
-
static bool check_variance
When set, some Functions will throw an Error if input variance <= 0.
-
Function()