MEAL::SumRule< T > Class Template Reference

Represents a sum of models. More...

#include <SumRule.h>

Inheritance diagram for MEAL::SumRule< T >:
MEAL::GroupRule< T >

Public Types

typedef T::Result Result
Public Types inherited from MEAL::GroupRule< T >
typedef T::Result Result

Public Member Functions

void operator+= (T *model)
 Add the model to the sum.
std::string get_name () const
 Return the name of the class.
Public Member Functions inherited from MEAL::GroupRule< T >
 GroupRule ()
 Default constructor.
 GroupRule (const GroupRule &meta)
 Copy constructor.
GroupRuleoperator= (const GroupRule &meta)
 Assignment operator.
 ~GroupRule ()
 Destructor.
void add_model (T *model)
 Add an element to the result.
void remove_model (T *model)
 Remove an element from the result.
T * get_model (unsigned i)
 Get the specified component.
const T * get_model (unsigned i) const
unsigned get_nmodel () const
 Get the number of components.
void clear ()
 Clear all models.
void parse (const std::string &text)
 Parse the values of model parameters and fit flags from a string.
std::string class_name () const

Protected Member Functions

const Result get_identity () const
 Return the identity of the addition group (zero)
void operate (Result &total, const Result &element)
 Add the element to the total.
const Result partial (const Result &element) const
 Neighbouring terms do not affect each other's partial derivatives.
Protected Member Functions inherited from MEAL::GroupRule< T >
void print_parameters (std::string &text, const std::string &sep) const
 Prints the values of model parameters and fit flags to a string.
void calculate (Result &result, std::vector< Result > *grad)
 Return the result and its gradient.

Detailed Description

template<class T>
class MEAL::SumRule< T >

Represents a sum of models.

Member Function Documentation

◆ get_identity()

template<class T>
const Result MEAL::SumRule< T >::get_identity ( ) const
inlineprotectedvirtual

Return the identity of the addition group (zero)

Implements MEAL::GroupRule< T >.

◆ operate()

template<class T>
void MEAL::SumRule< T >::operate ( Result & total,
const Result & element )
inlineprotectedvirtual

Add the element to the total.

Implements MEAL::GroupRule< T >.

◆ partial()

template<class T>
const Result MEAL::SumRule< T >::partial ( const Result & element) const
inlineprotectedvirtual

Neighbouring terms do not affect each other's partial derivatives.

Implements MEAL::GroupRule< T >.


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

Generated using doxygen 1.14.0