11#ifndef FAUNA_FORAGE_BASE_H
12#define FAUNA_FORAGE_BASE_H
40 if (d < 0.0 || d > 1.0)
41 throw std::invalid_argument(
42 "Fauna::ForageBase::set_digestibility(): "
43 "Digestibility out of range.");
75 const double other_weight);
Base class for herbivore forage in a habitat.
Definition: forage_base.h:19
double get_digestibility() const
Fractional digestibility of the biomass for ruminants.
Definition: forage_base.h:29
double dry_matter_mass
Definition: forage_base.h:21
void set_mass(const double dm)
Dry matter forage biomass over the whole area [kgDM/km²].
Definition: forage_base.cpp:38
double get_nitrogen_mass() const
Nitrogen mass per area [kgN/km²].
Definition: forage_base.h:35
void set_digestibility(const double d)
Fractional digestibility of the biomass for ruminants.
Definition: forage_base.h:39
double get_mass() const
Dry matter forage biomass over the whole area [kgDM/km²].
Definition: forage_base.h:32
void set_nitrogen_mass(const double n_mass)
Nitrogen mass per area [kgN/km²].
Definition: forage_base.cpp:51
ForageBase()
Constructor with zero values.
Definition: forage_base.h:25
ForageBase & merge_base(const ForageBase &other, const double this_weight, const double other_weight)
Merge this object with another one by building (weighted) means.
Definition: forage_base.cpp:17
double nitrogen_mass
Definition: forage_base.h:21
double digestibility
Definition: forage_base.h:21