Class MEAL::GroupRule

template<class T>
class GroupRule : public T

Abstract base class of closed, associative, binary operators.

Because the binary operation is associative, this class is implemented as a series of elements; that is, an arbitrary number of models can be added. By inheriting this class and defining the get_identity(), operate(), and partial() pure virtual methods, derived classes may define the closed, associative binary operation, such as the product or sum.

Subclassed by MEAL::ProductRule< T >, MEAL::SumRule< T >

Public Functions

inline GroupRule()

Default constructor.

inline GroupRule(const GroupRule &meta)

Copy constructor.

GroupRule &operator=(const GroupRule &meta)

Assignment operator.

inline ~GroupRule()

Destructor.

void add_model(T *model)

Add an element to the result.

void remove_model(T *model)

Remove an element from the result.

inline T *get_model(unsigned i)

Get the specified component.

inline 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.