Classes | Public Member Functions | Static Public Member Functions | Protected Attributes

Function Class Reference

Inheritance diagram for Function:
Inheritance graph
[legend]

List of all members.

Classes

struct  Multi

Public Member Functions

 Function (const Settings *settings, const std::string &name, const Tplate::Ptr tp, const std::vector< std::string > &vars)
virtual void init ()
const Tplate::Ptr & tp () const
int nv () const
 number of variables
virtual void calculate_value_in_range (const std::vector< realt > &x, std::vector< realt > &y, int first, int last) const =0
 calculate value at x[i] and _add_ the result to y[i] (for each i)
void calculate_value (const std::vector< realt > &x, std::vector< realt > &y) const
realt calculate_value (realt x) const
virtual void calculate_value_deriv_in_range (const std::vector< realt > &x, std::vector< realt > &y, std::vector< realt > &dy_da, bool in_dx, int first, int last) const =0
 wrapper around array version
void calculate_value_deriv (const std::vector< realt > &x, std::vector< realt > &y, std::vector< realt > &dy_da, bool in_dx=false) const
void do_precomputations (const std::vector< Variable * > &variables)
virtual void more_precomputations ()
void erased_parameter (int k)
virtual bool get_nonzero_range (double, realt &, realt &) const
virtual bool get_center (realt *a) const
virtual bool get_height (realt *) const
virtual bool get_fwhm (realt *) const
virtual bool get_area (realt *) const
bool get_iwidth (realt *a) const
 integral width := area / height
virtual const std::vector
< std::string > & 
get_other_prop_names () const
 get list of other properties (e.g. like Lorentzian-FWHM of Voigt)
virtual realt get_other_prop (const std::string &) const
 returns value of the property, or 0 if not defined
const std::vector< realt > & av () const
std::string get_basic_assignment () const
 return sth like: f = Linear($foo, $_2)
std::string get_current_assignment (const std::vector< Variable * > &variables, const std::vector< realt > &parameters) const
 return sth like: f = Linear(a0=$foo, a1=~3.5)
virtual std::string get_current_formula (const std::string &x="x") const
virtual std::string get_param (int n) const
int get_param_nr (const std::string &param) const
realt get_param_value (const std::string &param) const
realt numarea (realt x1, realt x2, int nsteps) const
realt find_x_with_value (realt x1, realt x2, realt val, int max_iter=1000) const
realt find_extremum (realt x1, realt x2, int max_iter=1000) const
 finds root of derivative, using bisection method
virtual std::string get_bytecode () const

Static Public Member Functions

static Functionfactory (const Settings *settings, const std::string &name, const Tplate::Ptr tp, const std::vector< std::string > &vars)

Protected Attributes

const Settingssettings_
Tplate::Ptr tp_
std::vector< realt > av_
std::vector< Multimulti_
int center_idx_

Detailed Description

Definition at line 16 of file func.h.


Member Function Documentation

realt Function::find_x_with_value ( realt  x1,
realt  x2,
realt  val,
int  max_iter = 1000 
) const

search x in [x1, x2] for which f(x)==val, x1, x2, val: f(x1) <= val <= f(x2) or f(x2) <= val <= f(x1) bisection + Newton-Raphson

Definition at line 239 of file func.cpp.


Member Data Documentation

std::vector<realt> Function::av_ [protected]

current values of arguments, the vector can be extended by derived classes to store temporary values

Definition at line 103 of file func.h.

Referenced by nv().


The documentation for this class was generated from the following files:

Generated on Mon Jul 18 2011 17:25:28 for Fityk by Doxygen 1.7.1