OpenMS  2.6.0
Public Member Functions | List of all members
ModelDescription< D > Class Template Reference

Stores the name and parameters of a model. More...

#include <OpenMS/TRANSFORMATIONS/FEATUREFINDER/ModelDescription.h>

Collaboration diagram for ModelDescription< D >:
[legend]

Public Member Functions

 ModelDescription ()
 Default constructor. More...
 
 ModelDescription (const ModelDescription &source)
 copy constructor More...
 
 ModelDescription (const BaseModel< D > *model)
 constructor provided for convenience More...
 
virtual ~ModelDescription ()
 destructor More...
 
virtual ModelDescriptionoperator= (const ModelDescription &source)
 assignment operator More...
 
BaseModel< D > * createModel ()
 
const StringgetName () const
 Non-mutable access to model name. More...
 
StringgetName ()
 Mutable access to the model name. More...
 
void setName (const String &name)
 Set the model name. More...
 
const ParamgetParam () const
 Non-mutable access to model parameters. More...
 
ParamgetParam ()
 Mutable access to the model parameters. More...
 
void setParam (const Param &param)
 Set the model parameters. More...
 

Predicates

String name_
 
Param parameters_
 
virtual bool operator== (const ModelDescription &rhs) const
 
virtual bool operator!= (const ModelDescription &rhs) const
 

Detailed Description

template<UInt D>
class OpenMS::ModelDescription< D >

Stores the name and parameters of a model.

This class also allows reconstruction of the model.

See also
BaseModel

Constructor & Destructor Documentation

◆ ModelDescription() [1/3]

ModelDescription ( )
inline

Default constructor.

◆ ModelDescription() [2/3]

ModelDescription ( const ModelDescription< D > &  source)
inline

copy constructor

◆ ModelDescription() [3/3]

ModelDescription ( const BaseModel< D > *  model)
inline

constructor provided for convenience

◆ ~ModelDescription()

virtual ~ModelDescription ( )
inlinevirtual

destructor

Member Function Documentation

◆ createModel()

BaseModel<D>* createModel ( )
inline

creates model from the parameters defined in this class returns 0 if no description is set.

References ModelDescription< D >::name_, ModelDescription< D >::parameters_, and DefaultParamHandler::setParameters().

Referenced by ProductModel< 2 >::operator=(), and ProductModel< 2 >::ProductModel().

◆ getName() [1/2]

String& getName ( )
inline

Mutable access to the model name.

References ModelDescription< D >::name_.

◆ getName() [2/2]

const String& getName ( ) const
inline

Non-mutable access to model name.

Accessors

◆ getParam() [1/2]

Param& getParam ( )
inline

Mutable access to the model parameters.

References ModelDescription< D >::parameters_.

◆ getParam() [2/2]

const Param& getParam ( ) const
inline

Non-mutable access to model parameters.

References ModelDescription< D >::parameters_.

◆ operator!=()

virtual bool operator!= ( const ModelDescription< D > &  rhs) const
inlinevirtual

◆ operator=()

virtual ModelDescription& operator= ( const ModelDescription< D > &  source)
inlinevirtual

◆ operator==()

virtual bool operator== ( const ModelDescription< D > &  rhs) const
inlinevirtual

◆ setName()

void setName ( const String name)
inline

Set the model name.

References ModelDescription< D >::name_.

◆ setParam()

void setParam ( const Param param)
inline

Set the model parameters.

References ModelDescription< D >::parameters_.

Member Data Documentation

◆ name_

String name_
protected

◆ parameters_

Param parameters_
protected