Modular Megafauna Model 1.1.5
A physiological, dynamic herbivore simulator in C++.
Loading...
Searching...
No Matches
Fauna::BreedingSeason Class Reference

Helper class for reproduction within a breeding season. More...

#include <breeding_season.h>

Public Member Functions

 BreedingSeason (const int breeding_season_start, const int breeding_season_length)
 Constructor. More...
 
bool is_in_season (const int day) const
 Whether given day (0=Jan 1st) is in the breeding season. More...
 
double annual_to_daily_rate (const double annual) const
 Convert an annual reproduction rate to a daily one in season. More...
 
bool operator== (const BreedingSeason &other) const
 Whether all member variables are the same in the other object. More...
 

Private Attributes

int start
 
int length
 

Detailed Description

Helper class for reproduction within a breeding season.

Constructor & Destructor Documentation

◆ BreedingSeason()

BreedingSeason::BreedingSeason ( const int  breeding_season_start,
const int  breeding_season_length 
)

Constructor.

Parameters
breeding_season_startThe day of the year (0=Jan 1st) at which the breeding season starts.
breeding_season_lengthLength of the breeding season in days [1–365].

Member Function Documentation

◆ annual_to_daily_rate()

double BreedingSeason::annual_to_daily_rate ( const double  annual) const

Convert an annual reproduction rate to a daily one in season.

◆ is_in_season()

bool BreedingSeason::is_in_season ( const int  day) const

Whether given day (0=Jan 1st) is in the breeding season.

Exceptions
std::invalid_argumentIf day is not in [0,364].

◆ operator==()

bool Fauna::BreedingSeason::operator== ( const BreedingSeason other) const
inline

Whether all member variables are the same in the other object.

Member Data Documentation

◆ length

int Fauna::BreedingSeason::length
private

◆ start

int Fauna::BreedingSeason::start
private

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