11#ifndef FAUNA_HABITAT_FORAGE_H
12#define FAUNA_HABITAT_FORAGE_H
52 const double other_weight);
67 throw std::logic_error((std::string)
68 "Fauna::HabitatForage::operator[]()const "
71 "is not implemented.");
84 throw std::logic_error(
85 "Fauna::HabitatForage::operator[]() "
89 "is not implemented.");
Base class for herbivore forage in a habitat.
Definition: forage_base.h:19
Grass forage in a habitat.
Definition: grass_forage.h:19
All values for large herbivore forage in a Habitat.
Definition: habitat_forage.h:21
HabitatForage()
Constructor with zero values.
Definition: habitat_forage.h:24
ForageFraction get_nitrogen_content()
Fraction of nitrogen in dry matter [kgN/kgDM].
Definition: habitat_forage.cpp:34
ForageBase get_total() const
Total forage in the habitat.
Definition: habitat_forage.cpp:45
HabitatForage & merge(const HabitatForage &other, const double this_weight, const double other_weight)
Merge this object with another one by building (weighted) means.
Definition: habitat_forage.cpp:68
ForageMass get_mass() const
Get dry matter mass [kgDM/km²] for all edible forage types.
Definition: habitat_forage.cpp:25
void set_nitrogen_content(const ForageFraction &nitrogen_content)
Set the nitrogen content [kgN/kgDM] for all forage types.
Definition: habitat_forage.cpp:78
Digestibility get_digestibility() const
Get digestibility [fractional] for all edible forage types.
Definition: habitat_forage.cpp:16
ForageBase & operator[](const ForageType ft)
Reference to forage object by forage type.
Definition: habitat_forage.h:76
ForageBase inedible
Inedible forage in the habitat.
Definition: habitat_forage.h:103
GrassForage grass
The grass forage in the habitat.
Definition: habitat_forage.h:28
const ForageBase & operator[](const ForageType ft) const
Reference to forage object by forage type.
Definition: habitat_forage.h:59
Definition of forage types (grass, browse, etc.)
Basic classes encapsulating forage amounts & fractions.
The forage class for grass.
const std::string & get_forage_type_name(const ForageType)
Get a short, lowercase string identifier for a forage type.
Definition: forage_types.cpp:30
ForageType
Different types of forage.
Definition: forage_types.h:21
@ Inedible
Plants that are not edible for herbivores.
@ Grass
Forage type grass.