Gadget
Public Member Functions | Protected Attributes | List of all members
PredatorAggregator Class Reference

This is the class used to aggregate predation information. More...

#include <predatoraggregator.h>

Collaboration diagram for PredatorAggregator:
Collaboration graph

Public Member Functions

 PredatorAggregator (const PredatorPtrVector &predators, const PreyPtrVector &preys, const IntMatrix &Areas, const LengthGroupDivision *const predLgrpDiv, const LengthGroupDivision *const preyLgrpDiv)
 This is the PredatorAggregator constructor for length based predators. More...
 
 PredatorAggregator (const PredatorPtrVector &predators, const PreyPtrVector &preys, const IntMatrix &Areas, const IntMatrix &predAges, const LengthGroupDivision *const preyLgrpDiv)
 This is the PredatorAggregator constructor for age based predators. More...
 
 ~PredatorAggregator ()
 This is the default PredatorAggregator destructor. More...
 
void Print (ofstream &outfile) const
 This will print the aggregator information to the ofstream specified. More...
 
void Reset ()
 This function will reset the predation data. More...
 
void Sum ()
 This function will aggregate the predation biomass data. More...
 
void NumberSum ()
 This function will aggregate the predation number data. More...
 
const DoubleMatrixPtrVectorgetSum () const
 This will return the DoubleMatrixPtrVector containing the aggregated predation information. More...
 

Protected Attributes

PredatorPtrVector predators
 This is the PredatorPtrVector of the predators that will be aggregated. More...
 
PreyPtrVector preys
 This is the PreyPtrVector of the preys that will be aggregated. More...
 
IntMatrix predConv
 This is the IntMatrix used to convert length group information for predators. More...
 
IntMatrix preyConv
 This is the IntMatrix used to convert length group information for preys. More...
 
IntMatrix areas
 This is the IntMatrix used to store area information. More...
 
IntMatrix doeseat
 This is the IntMatrix used to store predation information. More...
 
DoubleMatrixPtrVector total
 This is the DoubleMatrixPtrVector used to store the aggregated predation information. More...
 
const DoubleMatrixdptr
 This is the DoubleMatrix used to temporarily store information when aggregating the predation. More...
 
const AgeBandMatrixalk
 This is the AgeBandMatrix used to temporarily store information when aggregating the predation. More...
 
int usepredages
 This is the flag used to denote whether the predators are specified using age groups or length groups. More...
 

Detailed Description

This is the class used to aggregate predation information.

Constructor & Destructor Documentation

◆ PredatorAggregator() [1/2]

PredatorAggregator::PredatorAggregator ( const PredatorPtrVector predators,
const PreyPtrVector preys,
const IntMatrix Areas,
const LengthGroupDivision *const  predLgrpDiv,
const LengthGroupDivision *const  preyLgrpDiv 
)

This is the PredatorAggregator constructor for length based predators.

Parameters
predatorsis the PredatorPtrVector of the predators that will be aggregated
preysis the PreyPtrVector of the preys that will be aggregated
Areasis the IntMatrix of areas that the predation can take place on
predLgrpDivis the LengthGroupDivision of the predators
preyLgrpDivis the LengthGroupDivision of the preys

◆ PredatorAggregator() [2/2]

PredatorAggregator::PredatorAggregator ( const PredatorPtrVector predators,
const PreyPtrVector preys,
const IntMatrix Areas,
const IntMatrix predAges,
const LengthGroupDivision *const  preyLgrpDiv 
)

This is the PredatorAggregator constructor for age based predators.

Parameters
predatorsis the PredatorPtrVector of the predators that will be aggregated
preysis the PreyPtrVector of the preys that will be aggregated
Areasis the IntMatrix of areas that the predation can take place on
predAgesis the IntMatrix of the predator ages
preyLgrpDivis the LengthGroupDivision of the preys

◆ ~PredatorAggregator()

PredatorAggregator::~PredatorAggregator ( )

This is the default PredatorAggregator destructor.

Member Function Documentation

◆ getSum()

const DoubleMatrixPtrVector& PredatorAggregator::getSum ( ) const
inline

This will return the DoubleMatrixPtrVector containing the aggregated predation information.

Returns
total, the DoubleMatrixPtrVector of aggregated predation information

◆ NumberSum()

void PredatorAggregator::NumberSum ( )

This function will aggregate the predation number data.

◆ Print()

void PredatorAggregator::Print ( ofstream &  outfile) const

This will print the aggregator information to the ofstream specified.

Parameters
outfileis the ofstream to the file that the aggregator information gets sent to

◆ Reset()

void PredatorAggregator::Reset ( )

This function will reset the predation data.

◆ Sum()

void PredatorAggregator::Sum ( )

This function will aggregate the predation biomass data.

Member Data Documentation

◆ alk

const AgeBandMatrix* PredatorAggregator::alk
protected

This is the AgeBandMatrix used to temporarily store information when aggregating the predation.

◆ areas

IntMatrix PredatorAggregator::areas
protected

This is the IntMatrix used to store area information.

◆ doeseat

IntMatrix PredatorAggregator::doeseat
protected

This is the IntMatrix used to store predation information.

Note
doeseat[i][j] is the flag to denote whether predator i eats prey j

◆ dptr

const DoubleMatrix* PredatorAggregator::dptr
protected

This is the DoubleMatrix used to temporarily store information when aggregating the predation.

◆ predators

PredatorPtrVector PredatorAggregator::predators
protected

This is the PredatorPtrVector of the predators that will be aggregated.

◆ predConv

IntMatrix PredatorAggregator::predConv
protected

This is the IntMatrix used to convert length group information for predators.

Note
predConv[i][j] is the index of the length group in DoubleMatrixPtrVector total to which length group j of predator i belongs.

◆ preyConv

IntMatrix PredatorAggregator::preyConv
protected

This is the IntMatrix used to convert length group information for preys.

Note
preyConv[i][j] is the index of the length group in DoubleMatrixPtrVector total to which length group j of prey i belongs.

◆ preys

PreyPtrVector PredatorAggregator::preys
protected

This is the PreyPtrVector of the preys that will be aggregated.

◆ total

DoubleMatrixPtrVector PredatorAggregator::total
protected

This is the DoubleMatrixPtrVector used to store the aggregated predation information.

◆ usepredages

int PredatorAggregator::usepredages
protected

This is the flag used to denote whether the predators are specified using age groups or length groups.


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