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

This is the class used to store information about the length groups of the modelled stock population. More...

#include <lengthgroup.h>

Collaboration diagram for LengthGroupDivision:
Collaboration graph

Public Member Functions

 LengthGroupDivision (double minlength, double maxlength, double dl)
 This is the LengthGroupDivision constructor with evenly spaced length groups. More...
 
 LengthGroupDivision (const DoubleVector &vec)
 This is the LengthGroupDivision constructor with length groups that are possibly not evenly spaced. More...
 
 LengthGroupDivision (const LengthGroupDivision &lgrpdiv)
 This is the LengthGroupDivision constructor that creates a copy of an existing LengthGroupDivision. More...
 
 ~LengthGroupDivision ()
 This is the default LengthGroupDivision destructor. More...
 
double meanLength (int i) const
 This function will return the mean length of a specified length group. More...
 
double minLength (int i) const
 This function will return the minimum length of a specified length group. More...
 
double maxLength (int i) const
 This function will return the maximum length of a specified length group. More...
 
double minLength () const
 This function will return the minimum length of the smallest length group. More...
 
double maxLength () const
 This function will return the maximum length of the biggest length group. More...
 
double dl () const
 This function will return the step length of the length groups. More...
 
int numLengthGroups () const
 This function will return the total number of the length groups. More...
 
int numLengthGroup (double len) const
 This function will return the identifier of a length group containing a specified length. More...
 
int Combine (const LengthGroupDivision *const addition)
 This function will combine a second LengthGroupDivision with the current LengthGroupDivision. More...
 
int Error () const
 This function will return the flag denoting whether an error has occured or not. More...
 
void printError () const
 This function will print an error message about the LengthGroupDivision. More...
 
void Print (ofstream &outfile) const
 This function will print the LengthGroupDivision information. More...
 

Protected Attributes

int error
 This is the flag to denote whether an error has occured or not. More...
 
int size
 This is the size of the length group. More...
 
double Dl
 This is the step length for each length group. More...
 
double minlen
 This is the minimum length of the smallest length group. More...
 
double maxlen
 This is the maximum length of the biggest length group. More...
 
DoubleVector meanlength
 This is the DoubleVector of the mean lengths for each length group. More...
 
DoubleVector minlength
 This is the DoubleVector of the minimum lengths for each length group. More...
 

Detailed Description

This is the class used to store information about the length groups of the modelled stock population.

Constructor & Destructor Documentation

◆ LengthGroupDivision() [1/3]

LengthGroupDivision::LengthGroupDivision ( double  minlength,
double  maxlength,
double  dl 
)

This is the LengthGroupDivision constructor with evenly spaced length groups.

Parameters
minlengthis the minimum length of the smallest length group
maxlengthis the maximum length of the biggest length group
dlis the step length for each length group

◆ LengthGroupDivision() [2/3]

LengthGroupDivision::LengthGroupDivision ( const DoubleVector vec)

This is the LengthGroupDivision constructor with length groups that are possibly not evenly spaced.

Parameters
vecis the DoubleVector containing the end point of each length group

◆ LengthGroupDivision() [3/3]

LengthGroupDivision::LengthGroupDivision ( const LengthGroupDivision lgrpdiv)

This is the LengthGroupDivision constructor that creates a copy of an existing LengthGroupDivision.

Parameters
lgrpdivis the LengthGroupDivision to copy

◆ ~LengthGroupDivision()

LengthGroupDivision::~LengthGroupDivision ( )
inline

This is the default LengthGroupDivision destructor.

Member Function Documentation

◆ Combine()

int LengthGroupDivision::Combine ( const LengthGroupDivision *const  addition)

This function will combine a second LengthGroupDivision with the current LengthGroupDivision.

Returns
1 if the LengthGroupDivision has been combined sucessfully, 0 otherwise

◆ dl()

double LengthGroupDivision::dl ( ) const
inline

This function will return the step length of the length groups.

Returns
the step length

◆ Error()

int LengthGroupDivision::Error ( ) const
inline

This function will return the flag denoting whether an error has occured or not.

Returns
error

◆ maxLength() [1/2]

double LengthGroupDivision::maxLength ( ) const
inline

This function will return the maximum length of the biggest length group.

Returns
the maximum length

◆ maxLength() [2/2]

double LengthGroupDivision::maxLength ( int  i) const

This function will return the maximum length of a specified length group.

Parameters
iis the identifier of the length group
Returns
the maximum length of the length group

◆ meanLength()

double LengthGroupDivision::meanLength ( int  i) const

This function will return the mean length of a specified length group.

Parameters
iis the identifier of the length group
Returns
the mean length of the length group

◆ minLength() [1/2]

double LengthGroupDivision::minLength ( ) const
inline

This function will return the minimum length of the smallest length group.

Returns
the minimum length

◆ minLength() [2/2]

double LengthGroupDivision::minLength ( int  i) const

This function will return the minimum length of a specified length group.

Parameters
iis the identifier of the length group
Returns
the minimum length of the length group

◆ numLengthGroup()

int LengthGroupDivision::numLengthGroup ( double  len) const

This function will return the identifier of a length group containing a specified length.

Parameters
lenis the length to find in the length group
Returns
the identifier of the length group

◆ numLengthGroups()

int LengthGroupDivision::numLengthGroups ( ) const
inline

This function will return the total number of the length groups.

Returns
the number of length groups

◆ Print()

void LengthGroupDivision::Print ( ofstream &  outfile) const

This function will print the LengthGroupDivision information.

Parameters
outfileis the ofstream that the information gets sent to

◆ printError()

void LengthGroupDivision::printError ( ) const

This function will print an error message about the LengthGroupDivision.

Member Data Documentation

◆ Dl

double LengthGroupDivision::Dl
protected

This is the step length for each length group.

◆ error

int LengthGroupDivision::error
protected

This is the flag to denote whether an error has occured or not.

◆ maxlen

double LengthGroupDivision::maxlen
protected

This is the maximum length of the biggest length group.

◆ meanlength

DoubleVector LengthGroupDivision::meanlength
protected

This is the DoubleVector of the mean lengths for each length group.

◆ minlen

double LengthGroupDivision::minlen
protected

This is the minimum length of the smallest length group.

◆ minlength

DoubleVector LengthGroupDivision::minlength
protected

This is the DoubleVector of the minimum lengths for each length group.

◆ size

int LengthGroupDivision::size
protected

This is the size of the length group.


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