Go to the documentation of this file. 1 #ifndef MOJA_MODULES_CBM_YIELDTABLE_H_
2 #define MOJA_MODULES_CBM_YIELDTABLE_H_
4 #include "moja/modules/cbm/_modules.cbm_exports.h"
5 #include "moja/flint/modulebase.h"
24 int maxAge()
const {
return _maxAge; };
39 double operator[](
int age)
const;
60 void Initialize(
const std::vector<DynamicObject>& yieldTable);
65 void InterpolateVolumeAtEachAge();
74 void preProcessYieldData();
79 double linear(
double x,
double x0,
double x1,
double y0,
double y1);
92 return y0 + (x - x0) * (y1 - y0) / (x1 - x0);
double _totalVolume
Definition: treeyieldtable.h:83
std::vector< double > & yieldsAtEachAge()
Vector of volume (m^3/ha) at each age stop, 1 ha = 10,000 m^2
Definition: treeyieldtable.h:34
Definition: ageclasshelper.cpp:12
SpeciesType
Enumeration of tree species type, softwood or hardwood.
Definition: treespecies.h:14
int _maxAge
Definition: treeyieldtable.h:81
ADT - Tree yield table
Definition: treeyieldtable.h:16
double totalVolume() const
Total volume of the speciese growth curve
Definition: treeyieldtable.h:29
double linear(double x, double x0, double x1, double y0, double y1)
http://stackoverflow.com/questions/12838007/c-sharp-linear-interpolation
Definition: treeyieldtable.h:88
std::vector< double > _yieldsAtEachAge
Definition: treeyieldtable.h:85
int maxAge() const
Maximum age of the yield table
Definition: treeyieldtable.h:24
SpeciesType _speciesType
Definition: treeyieldtable.h:84
int _ageInterval
Definition: treeyieldtable.h:82
SpeciesType speciesType() const
Definition: treeyieldtable.h:44
Definition: ageclasshelper.cpp:10