Gadget
All Classes Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Member Functions | List of all members
PopStatistics Class Reference

This is the class used to calculate some standard statistics about a given population. More...

#include <popstatistics.h>

Collaboration diagram for PopStatistics:
Collaboration graph

Public Member Functions

 PopStatistics ()
 This is the default PopStatistics constructor. More...
 
 ~PopStatistics ()
 This is the default PopStatistics destructor. More...
 
void calcStatistics (const PopInfoIndexVector &pop, const LengthGroupDivision *const lgrpdiv, int calcweight=1)
 This function will calculate the standard statistics for a given population. More...
 
void calcStatistics (const AgeBandMatrix &agelenum, int lengr)
 This function will calculate the standard statistics for a given population. More...
 
double meanLength () const
 This will return the mean length of the population. More...
 
double meanWeight () const
 This will return the mean weight of the population. More...
 
double totalNumber () const
 This will return the total number in the population. More...
 
double sdevLength () const
 This will return the standard deviation of the length of the population. More...
 

Detailed Description

This is the class used to calculate some standard statistics about a given population.

Constructor & Destructor Documentation

◆ PopStatistics()

PopStatistics::PopStatistics ( )
inline

This is the default PopStatistics constructor.

◆ ~PopStatistics()

PopStatistics::~PopStatistics ( )
inline

This is the default PopStatistics destructor.

Member Function Documentation

◆ calcStatistics() [1/2]

void PopStatistics::calcStatistics ( const AgeBandMatrix agelenum,
int  lengr 
)

This function will calculate the standard statistics for a given population.

Parameters
agelenumis the the AgeBandMatrix that specifies the catch
lengris the Length group vector for which mean weight should be calculated

◆ calcStatistics() [2/2]

void PopStatistics::calcStatistics ( const PopInfoIndexVector pop,
const LengthGroupDivision *const  lgrpdiv,
int  calcweight = 1 
)

This function will calculate the standard statistics for a given population.

Parameters
popis the PopInfoIndexVector that specifies the population
lgrpdivis the LengthGroupDivision of the population
calcweightis the flag to denote whether the mean weight should be calculated or not (default value 1)

◆ meanLength()

double PopStatistics::meanLength ( ) const
inline

This will return the mean length of the population.

Returns
meanlength

◆ meanWeight()

double PopStatistics::meanWeight ( ) const
inline

This will return the mean weight of the population.

Returns
meanweight

◆ sdevLength()

double PopStatistics::sdevLength ( ) const
inline

This will return the standard deviation of the length of the population.

Returns
sdevlength

◆ totalNumber()

double PopStatistics::totalNumber ( ) const
inline

This will return the total number in the population.

Returns
totalnumber

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