|
Modular Megafauna Model 1.1.5
A physiological, dynamic herbivore simulator in C++.
|
Output data for herbivores and habitat(s). More...
#include <combined_data.h>
Public Member Functions | |
| CombinedData & | merge (const CombinedData &) |
| Merge other data into this object. More... | |
| CombinedData | reset () |
| Retrieve aggregated data and reset object. More... | |
Public Attributes | |
| unsigned int | datapoint_count = 0 |
| How many data points are merged in this object. More... | |
| HabitatData | habitat_data |
| Habitat output data. More... | |
| std::map< const std::string, HerbivoreData > | hft_data |
| Herbivore output data aggregated by output group. More... | |
Output data for herbivores and habitat(s).
This can be data for one Fauna::SimulationUnit (possibly aggregated over a period of time) or for a set of spatial units (aggregated over time and space).
| CombinedData & CombinedData::merge | ( | const CombinedData & | other | ) |
Merge other data into this object.
Use this to aggregate (=build averages) over space and time. datapoint_count is used to weigh the values in average-building.
For herbivore data (hft_data), the merge routine creates an empty HerbivoreData object as a ‘stub’ if the HFT is found in one of the merge partners, but not in the other one. This way, the averages are built correctly across habitats even if in one habitat, there are no herbivores of one type.
This does no calculations if the partners are the same object, or datapoint_count is zero in one of the two objects.
|
inline |
Retrieve aggregated data and reset object.
| unsigned int Fauna::Output::CombinedData::datapoint_count = 0 |
How many data points are merged in this object.
| HabitatData Fauna::Output::CombinedData::habitat_data |
Habitat output data.
| std::map<const std::string, HerbivoreData> Fauna::Output::CombinedData::hft_data |
Herbivore output data aggregated by output group.
An “output group” is typically an HFT.