Parameter policy for composite functions. More...

#include <Composite.h>

Inheritance diagram for MEAL::Composite:
MEAL::ParameterPolicy MEAL::FunctionPolicy Reference::Able Reference::HeapTracked

Public Member Functions

 Composite (Function *context)
 Default constructor.
Compositeclone (Function *context) const
 Clone constructor.
unsigned get_nmodel () const
 Get the number of models mapped into this model.
std::string class_name () const
 Get the name used in verbose output.
unsigned get_nparam () const
 Return the number of parameters.
std::string get_name (unsigned index) const
 Return the name of the specified parameter.
std::string get_description (unsigned index) const
 Return the name 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 variance)
 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.
template<class Type>
void map (Project< Type > &model)
 Convenience interface to map (Projection*)
template<class Type>
void unmap (Project< Type > &model)
 Convenience interface to unmap (Projection*)
void map (Projection *model)
 Map the Projection into the composite mappting.
void unmap (Projection *model)
 Remove the Projection from the composite mapping.
void clear ()
 Clear all models.
void get_imap (const Function *model, std::vector< unsigned >::iterator &imap) const
 Get the mapping for the given Function.
void attribute_changed (Function::Attribute attribute)
 Method called when a Function attribute has changed.
Public Member Functions inherited from MEAL::FunctionPolicy
 FunctionPolicy (Function *context=0)
 Default constructor.
 ~FunctionPolicy ()
 Destructor.
Functionget_context () const
 Return the Function for whom this policy operates.
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

unsigned find_Function (Function *model) const
 Return the index for the specified model.
unsigned find_Projection (Projection *model) const
 Return the index for the specified model.
Protected Member Functions inherited from MEAL::ParameterPolicy
 ParameterPolicy (Function *context)
 Default destructor.
Protected Member Functions inherited from Reference::Able
Handle__reference (bool active) const
void __dereference (bool auto_delete=true) const

Friends

class Projection
 Provide access to Projection base class.

Additional Inherited Members

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 ()
Static Public Attributes inherited from MEAL::ParameterPolicy
static bool auto_install = true
 Install policy upon construction.

Detailed Description

Parameter policy for composite functions.

Member Function Documentation

◆ clone()

Composite * MEAL::Composite::clone ( Function * context) const
inlinevirtual

Clone constructor.

Implements MEAL::ParameterPolicy.

References Composite().

◆ find_Projection()

unsigned MEAL::Composite::find_Projection ( Projection * model) const
protected

Return the index for the specified model.

Return the index for the specified map.

References class_name(), Projection, and MEAL::Function::very_verbose.

Referenced by map(), and unmap().

◆ get_description()

string MEAL::Composite::get_description ( unsigned index) const
virtual

Return the name of the specified parameter.

Return the description of the specified parameter.

Implements MEAL::ParameterPolicy.

References MEAL::Function::get_param_description().

◆ get_imap()

void MEAL::Composite::get_imap ( const Function * model,
std::vector< unsigned >::iterator & imap ) const

Get the mapping for the given Function.

Map the Function indeces.

If you haven't added the Function using a Projection, but still want to know its mapping, call this function.

References Composite(), get_imap(), MEAL::Function::get_name(), get_nmodel(), and MEAL::Function::get_nparam().

Referenced by get_imap().

◆ get_infit()

bool MEAL::Composite::get_infit ( unsigned index) const
virtual

Return true if parameter at index is to be fitted.

Implements MEAL::ParameterPolicy.

References MEAL::Function::get_infit().

◆ get_name()

string MEAL::Composite::get_name ( unsigned index) const
virtual

Return the name of the specified parameter.

Implements MEAL::ParameterPolicy.

References MEAL::Function::get_param_name().

◆ get_nmodel()

unsigned MEAL::Composite::get_nmodel ( ) const

Get the number of models mapped into this model.

Get the number of Functions.

References Composite().

Referenced by get_imap().

◆ get_nparam()

unsigned MEAL::Composite::get_nparam ( ) const
virtual

Return the number of parameters.

Implements MEAL::ParameterPolicy.

References Composite().

◆ get_param()

double MEAL::Composite::get_param ( unsigned index) const
virtual

Return the value of the specified parameter.

Implements MEAL::ParameterPolicy.

References MEAL::Function::get_param().

◆ get_variance()

double MEAL::Composite::get_variance ( unsigned index) const
virtual

Return the variance of the specified parameter.

Implements MEAL::ParameterPolicy.

References MEAL::Function::get_variance().

◆ set_argument()

void MEAL::Composite::set_argument ( unsigned dimension,
Argument * axis )

Set the independent variable of the specified dimension.

The most common abscissa type needs a simple interface.

References set_argument(), and MEAL::Function::verbose.

Referenced by set_argument().

◆ set_infit()

void MEAL::Composite::set_infit ( unsigned index,
bool flag )
virtual

Set flag for parameter at index to be fitted.

Implements MEAL::ParameterPolicy.

References MEAL::Function::set_infit().

◆ set_param()

void MEAL::Composite::set_param ( unsigned index,
double value )
virtual

Set the value of the specified parameter.

Implements MEAL::ParameterPolicy.

References MEAL::Function::set_param().

◆ set_variance()

void MEAL::Composite::set_variance ( unsigned index,
double variance )
virtual

Set the variance of the specified parameter.

Implements MEAL::ParameterPolicy.

References MEAL::Function::set_variance().


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

Generated using doxygen 1.14.0