Two-dimensional polynomial function. More...

#include <Polynomial2D.h>

Inheritance diagram for MEAL::Polynomial2D:
MEAL::Multivariate< Scalar > MEAL::Nvariate< Scalar > MEAL::Scalar MEAL::Evaluable< double > MEAL::Function Reference::Able Reference::HeapTracked

Public Member Functions

 Polynomial2D (unsigned ncoeff=0, unsigned mcoeff=0)
 Polynomial2D (const Polynomial2D &copy)
 Copy constructor.
const Polynomial2Doperator= (const Polynomial2D &copy)
 Assignment operator.
Polynomial2Dclone () const
 Clone operator.
std::string get_name () const
 Return the name of the class.
TextInterface::Parserget_interface ()
 Return a text interface that can be used to access this instance.
const std::pair< unsigned, unsigned > & get_ncoef () const
void set_ncoef (const std::pair< unsigned, unsigned > &nc)
void resize (unsigned ncoeff, unsigned mcoeff)
void set_abscissa_value (unsigned dim, double value)
 Set the abscissa value.
void set_abscissa_offset (unsigned dim, double x0)
 Set the abscissa offset.
Public Member Functions inherited from MEAL::Multivariate< Scalar >
 Multivariate (unsigned _ndim)
 Construct with number of dimensions (independent abscissae)
Multivariateoperator= (const Multivariate &copy)
 Assignment operator.
unsigned get_ndim () const
 Get the number of abscissa (dimension) of the function.
double get_abscissa_value (unsigned idim) const
 Get the abscissa value for the specified dimension.
Public Member Functions inherited from MEAL::Evaluable< double >
 Evaluable ()
 Default constructor.
Evaluableoperator= (const Evaluable &copy)
 Assignment operator.
double evaluate (std::vector< double > *grad=0) const
 Return the Jones matrix and its gradient.
EstimateTraits< double >::type estimate () const
 Return the Jones Estimate matrix.
Public Member Functions inherited from MEAL::Function
 Function ()
 Default constructor.
 Function (const Function &model)
 Copy constructor.
Functionoperator= (const Function &model)
 Assignment operator.
virtual ~Function ()
 Virtual destructor.
virtual void copy (const Function *model)
 Does the work for operator =.
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_description () const
 Return the description of the class.
unsigned get_nparam () const
 Return the number of parameters.
std::string get_param_name (unsigned index) const
 Return the name of the specified parameter.
std::string get_param_description (unsigned index) const
 Return the description of the specified parameter.
double get_param (unsigned index) const
 Return the value of the specified parameter.
void set_param (unsigned index, double value)
 Set the value of the specified parameter.
double get_variance (unsigned index) const
 Return the variance of the specified parameter.
void set_variance (unsigned index, double value)
 Set the variance of the specified parameter.
bool get_infit (unsigned index) const
 Return true if parameter at index is to be fitted.
void set_infit (unsigned index, bool flag)
 Set flag for parameter at index to be fitted.
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 > &param)
 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.
void set_evaluation_changed (bool _changed=true)
 Set true if the Function evaluation has changed.
bool get_evaluation_changed () const
 Return true if the Function evaluation has changed.
const ParameterPolicyget_parameter_policy () const
 Provide access to the parameter_policy attribute.
ParameterPolicyget_parameter_policy ()
 Provide access to the parameter_policy attribute.
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 Member Functions inherited from Reference::Able
 Able (const Able &)
Ableoperator= (const Able &)
unsigned get_reference_count () const
Public Member Functions inherited from Reference::HeapTracked
 HeapTracked (const HeapTracked &)
HeapTrackedoperator= (const HeapTracked &)
bool __is_on_heap () const

Protected Member Functions

void init ()
void calculate (double &result, std::vector< double > *grad)
 Calculate the complex value and its gradient.
void set_multivariate_policy (MultivariatePolicy *policy)
 The multivariate implementation.
MultivariatePolicyget_multivariate_policy () const
 The multivariate implementation.
void copy_multivariate_policy (const Multivariate *other)
 Copy the parameter policy of another instance.
Protected Member Functions inherited from MEAL::Evaluable< double >
void copy_evaluation_policy (const Evaluable *other)
Protected Member Functions inherited from MEAL::Function
void copy_evaluation_changed (const Function &model)
 Copy the evaluation changed state of another model instance.
void copy_parameter_policy (const Function *)
 Copy the parameter policy of another instance.
void set_parameter_policy (ParameterPolicy *policy)
 Set the parameter policy.
Protected Member Functions inherited from Reference::Able
Handle__reference (bool active) const
void __dereference (bool auto_delete=true) const

Protected Attributes

MEAL::ChainRule< MEAL::Scalarchain
MEAL::Polynomial poly
 Polynomial along first abscissa.
std::vector< MEAL::Polynomialcoefficients
 Polynomial variation of polynomial coefficients along second abscissa.
Protected Attributes inherited from MEAL::Evaluable< double >
Reference::To< EvaluationPolicy< double > > evaluation_policy
 The policy for managing function evaluation.
Protected Attributes inherited from MEAL::Function
Reference::To< ParameterPolicyparameter_policy
 The policy for managing function parameters.
Reference::To< ArgumentPolicyargument_policy
 The policy for managing function arguments.
bool set_parameter_policy_context
 Set the parameter policy context.
bool this_verbose
 The verbosity of this instance.

Additional Inherited Members

Public Types inherited from MEAL::Evaluable< double >
typedef double Result
 The return type of the evaluate method.
Public Types inherited from MEAL::Function
enum  Attribute { ParameterCount , Evaluation }
 Function attributes that require the attention of Composite models. More...
Static Public Member Functions inherited from MEAL::Function
template<class Model>
static Model * load (const std::string &filename)
 Construct a new Model instance from a file.
static Functionload_Function (const std::string &filename)
 Construct a new Function instance from a file.
static Functionfactory (const std::string &text)
 Construct a new Function instance from a string.
Static Public Member Functions inherited from Reference::Able
static size_t get_instance_count ()
Static Public Member Functions inherited from Reference::HeapTracked
static void * operator new (size_t size, void *ptr=0)
static void operator delete (void *location, void *ptr)
static void operator delete (void *location)
static size_t get_heap_queue_size ()
Public Attributes inherited from MEAL::Function
Callback< Attributechanged
 Callback executed when a Function Attribute has been changed.
Static Public Attributes inherited from MEAL::Scalar
static const char * Name = "Scalar"
 The name of the class.
Static Public Attributes inherited from MEAL::Evaluable< double >
static const char * Name
 The name of the class.
Static Public Attributes inherited from MEAL::Function
static bool verbose = false
 Verbosity flag.
static bool very_verbose = false
 Low-level verbosity flag.
static bool check_zero = false
 When set, some Functions will throw an Error if they evaluate to zero.
static bool check_variance = false
 When set, some Functions will throw an Error if input variance <= 0.
static bool cache_results = false
 When set, use the Cached evaluation policy and callbacks.

Detailed Description

Two-dimensional polynomial function.

Member Function Documentation

◆ calculate()

void MEAL::Polynomial2D::calculate ( double & result,
std::vector< double > *  )
inlineprotectedvirtual

Calculate the complex value and its gradient.

Implements MEAL::Evaluable< double >.

References MEAL::Evaluable< double >::evaluation_policy.

◆ clone()

Polynomial2D * MEAL::Polynomial2D::clone ( ) const
inlinevirtual

Clone operator.

Reimplemented from MEAL::Multivariate< Scalar >.

◆ get_interface()

TextInterface::Parser * MEAL::Polynomial2D::get_interface ( )
virtual

Return a text interface that can be used to access this instance.

Reimplemented from MEAL::Function.

◆ get_name()

std::string MEAL::Polynomial2D::get_name ( ) const
virtual

Return the name of the class.

Implements MEAL::Function.

◆ set_abscissa_value()

void MEAL::Polynomial2D::set_abscissa_value ( unsigned dim,
double value )
virtual

Set the abscissa value.

Reimplemented from MEAL::Multivariate< Scalar >.

References coefficients, poly, and MEAL::Multivariate< T >::set_abscissa_value().


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

Generated using doxygen 1.14.0