Modular Megafauna Model 1.1.5
A physiological, dynamic herbivore simulator in C++.
Loading...
Searching...
No Matches
forage_values.h File Reference

Basic classes encapsulating forage amounts & fractions. More...

#include <array>
#include <cmath>
#include <numeric>
#include <stdexcept>
#include "Fauna/average.h"
#include "Fauna/forage_types.h"

Go to the source code of this file.

Classes

class  Fauna::ForageValues< tag >
 

Namespaces

namespace  Fauna
 

Typedefs

typedef ForageValues< ForageValueTag::ZeroToOne > Fauna::Digestibility
 Digestibility [fraction] for different forage types. More...
 
typedef ForageValues< ForageValueTag::PositiveAndZero > Fauna::ForageEnergy
 Energy values [MJ] for different forage types. More...
 
typedef ForageValues< ForageValueTag::PositiveAndZero > Fauna::ForageEnergyContent
 Net energy content [MJ/kgDM] for different forage types. More...
 
typedef ForageValues< ForageValueTag::ZeroToOne > Fauna::ForageFraction
 A fraction for each forage type. More...
 
typedef ForageValues< ForageValueTag::PositiveAndZero > Fauna::ForageMass
 Dry matter mass values [kgDM or kgDM/km²] for different forage types. More...
 
typedef std::vector< std::pair< HerbivoreInterface *, ForageMass > > Fauna::ForageDistribution
 Data structure defining which herbivore gets what to eat [kgDM/km²]. More...
 

Enumerations

enum class  Fauna::ForageValueTag { Fauna::PositiveAndZero , Fauna::ZeroToOne }
 Describes which values are allowed in Fauna::ForageValues. More...
 

Functions

ForageValues< ForageValueTag::PositiveAndZero > Fauna::foragefractions_to_foragevalues (const ForageValues< ForageValueTag::ZeroToOne > &fractions)
 Convert forage fractions (in [0,1]) into values in [0,∞]. More...
 
ForageFraction Fauna::foragevalues_to_foragefractions (const ForageValues< ForageValueTag::PositiveAndZero > values, const double tolerance)
 Convert forage values to fractional values. More...
 
ForageFraction Fauna::convert_mj_to_kg_proportionally (const ForageValues< ForageValueTag::PositiveAndZero > &mj_per_kg, const ForageValues< ForageValueTag::ZeroToOne > &mj_proportions)
 Convert forage energy to mass keeping the energy-wise proportions. More...
 
Overload operator * as non-member.
ForageValues< ForageValueTag::PositiveAndZero > Fauna::operator* (const double lhs, const ForageFraction &rhs)
 Multiply forage fractions with coefficient, allowing numbers >0. More...
 
ForageValues< ForageValueTag::PositiveAndZero > Fauna::operator* (const ForageFraction &lhs, const ForageValues< ForageValueTag::PositiveAndZero > &rhs)
 Multiply forage fractions with coefficient, allowing numbers >0. More...
 
ForageValues< ForageValueTag::PositiveAndZero > Fauna::operator* (const ForageValues< ForageValueTag::PositiveAndZero > &lhs, const ForageFraction &rhs)
 Multiply forage fractions with coefficient, allowing numbers >0. More...
 

Detailed Description

Basic classes encapsulating forage amounts & fractions.

Date
2019