Gadget
|
This is the class used to calculate and store the suitability values for all the preys of a single predator. More...
#include <suits.h>
Public Member Functions | |
Suits () | |
This is the default Suits constructor. More... | |
~Suits () | |
This is the default Suits destructor. More... | |
void | addPrey (const char *preyname, SuitFunc *suitf) |
This function will add suitability values for a given prey. More... | |
void | deletePrey (int i, Keeper *const keeper) |
This function will delete suitability values for a given prey. More... | |
const char * | getPreyName (int i) const |
This function will return the name of a given prey. More... | |
void | Initialise (const Predator *const pred) |
This will initialise the preys that will be consumed by the predator. More... | |
int | numPreys () const |
This function will return the number of preys that have suitability values. More... | |
int | didChange (int i, const TimeClass *const TimeInfo) |
This function will check to see if the suitability parameters for a given prey have changed on the current timestep. More... | |
const DoubleMatrix & | getSuitability (int i) const |
This function will return the calculated suitability values for a given prey. More... | |
void | Reset (const Predator *const pred, const TimeClass *const TimeInfo) |
This function will reset the suitability information for a given predator. More... | |
Protected Attributes | |
CharPtrVector | preynames |
This is the CharPtrVector of prey names. More... | |
SuitFuncPtrVector | suitFunction |
This is the SuitFuncPtrVector of the suitability functions used when calculating the consumption of the preys. More... | |
DoubleMatrixPtrVector | preCalcSuitability |
This is the DoubleMatrixPtrVector of calculated suitability values. More... | |
This is the class used to calculate and store the suitability values for all the preys of a single predator.
|
inline |
This is the default Suits constructor.
Suits::~Suits | ( | ) |
This is the default Suits destructor.
void Suits::addPrey | ( | const char * | preyname, |
SuitFunc * | suitf | ||
) |
This function will add suitability values for a given prey.
preyname | is the name of the prey to be added |
suitf | is the SuitFunc that defines the suitability values |
void Suits::deletePrey | ( | int | i, |
Keeper *const | keeper | ||
) |
This function will delete suitability values for a given prey.
i | is the index of the prey to be deleted |
keeper | is the Keeper for the current model |
|
inline |
This function will check to see if the suitability parameters for a given prey have changed on the current timestep.
i | is the index of the prey |
TimeInfo | is the TimeClass for the current model |
|
inline |
This function will return the name of a given prey.
i | is the index of the prey |
|
inline |
This function will return the calculated suitability values for a given prey.
i | is the index of the prey |
void Suits::Initialise | ( | const Predator *const | pred | ) |
This will initialise the preys that will be consumed by the predator.
pred | is the Predator that the suitability functions are defined for |
|
inline |
This function will return the number of preys that have suitability values.
|
protected |
This is the DoubleMatrixPtrVector of calculated suitability values.
|
protected |
This is the CharPtrVector of prey names.
|
protected |
This is the SuitFuncPtrVector of the suitability functions used when calculating the consumption of the preys.