Base class for herbivore forage in a habitat.
More...
#include <forage_base.h>
Base class for herbivore forage in a habitat.
◆ ForageBase()
| Fauna::ForageBase::ForageBase |
( |
| ) |
|
|
inline |
Constructor with zero values.
◆ get_digestibility()
| double Fauna::ForageBase::get_digestibility |
( |
| ) |
const |
|
inline |
Fractional digestibility of the biomass for ruminants.
Digestibility as measured in-vitro with rumen liquor.
◆ get_mass()
| double Fauna::ForageBase::get_mass |
( |
| ) |
const |
|
inline |
Dry matter forage biomass over the whole area [kgDM/km²].
◆ get_nitrogen_mass()
| double Fauna::ForageBase::get_nitrogen_mass |
( |
| ) |
const |
|
inline |
Nitrogen mass per area [kgN/km²].
◆ merge_base()
| ForageBase & ForageBase::merge_base |
( |
const ForageBase & |
other, |
|
|
const double |
this_weight, |
|
|
const double |
other_weight |
|
) |
| |
|
protected |
Merge this object with another one by building (weighted) means.
Forage mass is simply weighted with the number of data points given by this_weight and other_weight. In contrast, weighting digestibility considers also the forage mass of this and the other object. This way, merging a ForageBase object that has zero forage will disregard its digestibility.
- Parameters
-
| other | Other object to merge into this one. |
| this_weight | Number of data points this object aggregates. |
| other_weight | Number of data points the other object aggregates. |
- Returns
- This object.
- Exceptions
-
- See also
- Fauna::average().
◆ set_digestibility()
| void Fauna::ForageBase::set_digestibility |
( |
const double |
d | ) |
|
|
inline |
Fractional digestibility of the biomass for ruminants.
Digestibility as measured in-vitro with rumen liquor.
- Exceptions
-
| std::invalid_argument | if not 0.0<=d<=1.0 |
◆ set_mass()
| void ForageBase::set_mass |
( |
const double |
dm | ) |
|
Dry matter forage biomass over the whole area [kgDM/km²].
- Exceptions
-
| std::invalid_argument | If dm<0.0 |
| std::logic_error | If nitrogen mass > dry matter mass. |
◆ set_nitrogen_mass()
| void ForageBase::set_nitrogen_mass |
( |
const double |
n_mass | ) |
|
Nitrogen mass per area [kgN/km²].
- Exceptions
-
| std::invalid_argument | If n_mass < 0.0. |
| std::logic_error | If nitrogen mass > dry matter mass. |
◆ digestibility
| double Fauna::ForageBase::digestibility |
|
private |
◆ dry_matter_mass
| double Fauna::ForageBase::dry_matter_mass |
|
private |
◆ nitrogen_mass
| double Fauna::ForageBase::nitrogen_mass |
|
private |
The documentation for this class was generated from the following files:
- /home/docs/checkouts/readthedocs.org/user_builds/modular-megafauna-model/checkouts/latest/include/Fauna/forage_base.h
- /home/docs/checkouts/readthedocs.org/user_builds/modular-megafauna-model/checkouts/latest/src/Fauna/forage_base.cpp