Gadget
Public Member Functions | Protected Attributes | List of all members
SelectFunc Class Referenceabstract

This is the base class used to calculate the selection level as a function of length. More...

#include <selectfunc.h>

Inheritance diagram for SelectFunc:
Inheritance graph
Collaboration diagram for SelectFunc:
Collaboration graph

Public Member Functions

 SelectFunc (const char *givenname)
 This is the default SelectFunc constructor. More...
 
virtual ~SelectFunc ()
 This is the default SelectFunc destructor. More...
 
void readConstants (CommentStream &infile, const TimeClass *const TimeInfo, Keeper *const keeper)
 This function will read the value of the selection function parameters from file. More...
 
void updateConstants (const TimeClass *const TimeInfo)
 This function will update the selection function parameters. More...
 
int didChange (const TimeClass *const TimeInfo)
 This function will check to see if the selection function parameters have changed. More...
 
virtual double calculate (double len)=0
 This will return the selection level that has been calculated. More...
 
int numConstants ()
 This will return the number of constants used to calculate the selection value. More...
 
- Public Member Functions inherited from HasName
 HasName ()
 This is the default HasName constructor. More...
 
virtual ~HasName ()
 This is the default HasName destructor. More...
 
 HasName (const char *givenname)
 This is the HasName constructor for a specified name. More...
 
const char * getName () const
 This will return a null terminated text string containing the name of the object. More...
 

Protected Attributes

ModelVariableVector coeff
 This is the ModelVariableVector of the selection function constants. More...
 

Detailed Description

This is the base class used to calculate the selection level as a function of length.

Note
This will always be overridden by the derived classes that actually calculate the selection level

Constructor & Destructor Documentation

◆ SelectFunc()

SelectFunc::SelectFunc ( const char *  givenname)
inline

This is the default SelectFunc constructor.

Parameters
givennameis the name for the SelectFunc selection function

◆ ~SelectFunc()

virtual SelectFunc::~SelectFunc ( )
inlinevirtual

This is the default SelectFunc destructor.

Member Function Documentation

◆ calculate()

virtual double SelectFunc::calculate ( double  len)
pure virtual

This will return the selection level that has been calculated.

Parameters
lenis the length of the length class that is selected
Returns
0 (will be overridden in derived classes)

Implemented in StraightSelectFunc, ExpSelectFunc, and ConstSelectFunc.

◆ didChange()

int SelectFunc::didChange ( const TimeClass *const  TimeInfo)

This function will check to see if the selection function parameters have changed.

Parameters
TimeInfois the TimeClass for the current model
Returns
1 if the parameters have changed, 0 otherwise

◆ numConstants()

int SelectFunc::numConstants ( )
inline

This will return the number of constants used to calculate the selection value.

Returns
number

◆ readConstants()

void SelectFunc::readConstants ( CommentStream infile,
const TimeClass *const  TimeInfo,
Keeper *const  keeper 
)

This function will read the value of the selection function parameters from file.

Parameters
infileis the CommentStream to read the parameters from
TimeInfois the TimeClass for the current model
keeperis the Keeper for the current model

◆ updateConstants()

void SelectFunc::updateConstants ( const TimeClass *const  TimeInfo)

This function will update the selection function parameters.

Parameters
TimeInfois the TimeClass for the current model

Member Data Documentation

◆ coeff

ModelVariableVector SelectFunc::coeff
protected

This is the ModelVariableVector of the selection function constants.


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