8#ifndef FMTYLDDATA_H_INCLUDED
9#define FMTYLDDATA_H_INCLUDED
13#include <unordered_map>
14#include <unordered_set>
16#include <boost/serialization/serialization.hpp>
17#include <boost/serialization/nvp.hpp>
32 friend class boost::serialization::access;
33 template<
class Archive>
34 void serialize(Archive& ar,
const unsigned int version)
36 ar & BOOST_SERIALIZATION_NVP(mask);
37 ar & BOOST_SERIALIZATION_NVP(bases);
42 mutable std::unordered_set<std::string>
lookat;
43 bool basepush_data(std::map<std::string, FMTdata>& elements,
const std::string& yld,
const double& value);
56 double getlinearvalue(
const std::vector<double>& dls,
const int& agetarget,
bool allowoutofrange)
const;
61 void setbase(
const std::vector<int>& allvalues);
65 virtual bool push_data(
const std::string& yld,
const double& value);
67 virtual std::vector<std::string>
indexes(
const std::vector<std::string>& names)
const;
68 virtual operator std::string()
const;
69 virtual std::vector<std::string>
compare(
const std::vector<std::string>& keys)
const;
70 virtual std::unique_ptr<FMTyieldhandler>
clone()
const;
73 virtual size_t size()
const;
76 virtual const FMTdata&
at(
const std::string& yldname)
const;
81 virtual std::map<std::string, std::vector<double>>
getallyieldsdata(
const int& maxbase)
const;
82 virtual std::unique_ptr<FMTyieldhandler>
presolve(
const FMTmaskfilter& filter,
const std::vector<FMTtheme>& newthemes)
const;
83 virtual std::unique_ptr<FMTyieldhandler>
postsolve(
const FMTmaskfilter& filter,
const std::vector<FMTtheme>& basethemes)
const;
84 virtual std::unique_ptr<FMTyieldhandler>
getfromfactor(
const double& factor,
85 std::vector<std::string>yieldnames = std::vector<std::string>())
const;
86 virtual int getendpoint(
const std::string& yld,
const int& lowerstep,
const double& bound,
const double& value)
const;
#define FMTEXPORT
Definition: FMTutility.hpp:92
Definition: FMTdata.hpp:32
Definition: FMTmask.hpp:96
Definition: FMTmaskfilter.hpp:27
Definition: FMTobject.hpp:50
Definition: FMTbounds.hpp:342
Definition: FMTyieldhandler.hpp:31
virtual std::vector< std::string > indexes(const std::vector< std::string > &names) const
virtual int getlastbase() const
virtual std::vector< std::string > compare(const std::vector< std::string > &keys) const
virtual bool empty() const
virtual std::unique_ptr< FMTyieldhandler > presolve(const FMTmaskfilter &filter, const std::vector< FMTtheme > &newthemes) const
virtual std::unique_ptr< FMTyieldhandler > postsolve(const FMTmaskfilter &filter, const std::vector< FMTtheme > &basethemes) const
virtual bool push_data(const std::string &yld, const FMTdata &data)
virtual const FMTdata & at(const std::string &yldname) const
virtual std::vector< size_t > gettabous() const
void setbase(const std::vector< int > &allvalues)
virtual size_t getoverrideindex() const
std::unordered_set< std::string > lookat
Definition: FMTyieldhandler.hpp:42
virtual double getlastvalue(const std::string yld) const
virtual double getpeak(const FMTyieldrequest &request, const std::string &yld, const int &targetage) const
const std::vector< int > & getbases() const
bool push_base(const int &base)
virtual size_t size() const
virtual double getyieldlinearvalue(const std::string &yldname, const FMTyieldrequest &request, bool allowoutofrange=true) const
int getmaxbase(const FMTyieldrequest &request) const
virtual FMTdata & operator[](const std::string &yldname)
double getchangesfrom(const int &targetage, const int &peakstep) const
virtual bool containsyield(const std::string &yldname) const
virtual bool push_data(const std::string &yld, const double &value)
FMTyieldhandler()=default
bool basepush_data(std::map< std::string, FMTdata > &elements, const std::string &yld, const double &value)
virtual FMTyldtype gettype() const
virtual std::vector< std::string > getyieldnames() const
virtual std::unique_ptr< FMTyieldhandler > clone() const
virtual void setoverrideindex(const size_t &newindex)
bool basepush_data(std::map< std::string, FMTdata > &elements, const std::string &yld, const FMTdata &data)
virtual std::map< std::string, std::vector< double > > getallyieldsdata(const int &maxbase) const
FMTyieldhandler(const FMTyieldhandler &rhs)=default
double getlinearvalue(const std::vector< double > &dls, const int &agetarget, bool allowoutofrange) const
bool inlookat(const std::string &yld) const
virtual double get(const std::string &yld, const FMTyieldrequest &request) const
virtual void clearcache()
FMTyieldhandler(const FMTmask &lmask)
virtual ~FMTyieldhandler()=default
virtual bool isnullyield(const std::string &yldname) const
virtual std::unique_ptr< FMTyieldhandler > getfromfactor(const double &factor, std::vector< std::string >yieldnames=std::vector< std::string >()) const
FMTmask mask
Definition: FMTyieldhandler.hpp:40
std::vector< int > bases
Definition: FMTyieldhandler.hpp:41
virtual int getendpoint(const std::string &yld, const int &lowerstep, const double &bound, const double &value) const
virtual int getage(const FMTyieldrequest &request, const FMTspec &spec) const
Definition: FMTyieldrequest.hpp:36
The Core namespace provides classes for simulating stands/strata growth/harvest through time.
Definition: FMTaction.hpp:31
FMTyldtype
Definition: FMTutility.hpp:45