Function object for herbivore death after given lifespan is reached.
More...
#include <mortality_factors.h>
Function object for herbivore death after given lifespan is reached.
◆ GetSimpleLifespanMortality()
| GetSimpleLifespanMortality::GetSimpleLifespanMortality |
( |
const int |
lifespan_years | ) |
|
Constructor.
- Parameters
-
| lifespan_years | Lifespan in years |
- Exceptions
-
| std::invalid_argument | If lifespan_years<=0. |
◆ operator()()
| double Fauna::GetSimpleLifespanMortality::operator() |
( |
const int |
age_days | ) |
const |
|
inline |
Calculate mortality for today.
- Parameters
-
| age_days | Current age of the herbivore in days (0=first day of life). |
- Exceptions
-
| std::invalid_argument | If age_days<0. |
- Returns
- 0.0 if age<lifespan; 1.0 if age>=lifespan
◆ lifespan_years
| int Fauna::GetSimpleLifespanMortality::lifespan_years |
|
private |
The documentation for this class was generated from the following files:
- /home/docs/checkouts/readthedocs.org/user_builds/modular-megafauna-model/checkouts/latest/src/Fauna/mortality_factors.h
- /home/docs/checkouts/readthedocs.org/user_builds/modular-megafauna-model/checkouts/latest/src/Fauna/mortality_factors.cpp