8#ifndef FMTAGEYIELDHANDLER_H_INCLUDED
9#define FMTAGEYIELDHANDLER_H_INCLUDED
13#include <boost/serialization/serialization.hpp>
14#include <boost/serialization/nvp.hpp>
21 friend class boost::serialization::access;
22 template<
class Archive>
23 void serialize(Archive& ar,
const unsigned int version)
25 ar& boost::serialization::make_nvp(
"FMTyieldhandler", boost::serialization::base_object<FMTyieldhandler>(*
this));
26 ar& BOOST_SERIALIZATION_NVP(elements);
28 std::map<std::string, FMTdata>elements;
29 int getage(
const std::string yld,
const double& value,
const int& starting_age)
const;
32 virtual operator std::string()
const;
48 virtual void setyieldvalues(
const std::string& yldname,
const std::vector<int>& baseages,
const std::vector<double>& values);
50 virtual bool push_data(
const std::string& yld,
const double& value);
52 virtual std::unique_ptr<FMTyieldhandler>
clone()
const;
55 virtual size_t size()
const;
58 virtual const FMTdata&
at(
const std::string& yldname)
const;
62 virtual std::map<std::string, std::vector<double>>
getallyieldsdata(
const int& maxbase)
const;
63 virtual std::unique_ptr<FMTyieldhandler>
getfromfactor(
const double& factor,
64 std::vector<std::string>yieldnames = std::vector<std::string>())
const;
65 virtual int getendpoint(
const std::string& yld,
const int& lowerstep,
const double& bound,
const double& value)
const;
67 virtual double getpeakfrom(
const std::string& yld,
double maxvalue = std::numeric_limits<double>::lowest())
const;
#define FMTEXPORT
Definition: FMTutility.hpp:92
Definition: FMTageyieldhandler.hpp:20
virtual FMTdata & operator[](const std::string &yldname)
virtual std::map< std::string, std::vector< double > > getallyieldsdata(const int &maxbase) const
virtual std::unique_ptr< FMTyieldhandler > getfromfactor(const double &factor, std::vector< std::string >yieldnames=std::vector< std::string >()) const
FMTageyieldhandler(const FMTmask &mask)
virtual double getpeakfrom(const std::string &yld, double maxvalue=std::numeric_limits< double >::lowest()) const
virtual bool containsyield(const std::string &yldname) const
virtual bool push_data(const std::string &yld, const double &value)
virtual double getpeak(const FMTyieldrequest &request, const std::string &yld, const int &targetage) const
virtual bool push_data(const std::string &yld, const FMTdata &data)
virtual int getendpoint(const std::string &yld, const int &lowerstep, const double &bound, const double &value) const
~FMTageyieldhandler()=default
virtual int getage(const FMTyieldrequest &request, const FMTspec &spec) const
virtual const FMTdata & at(const std::string &yldname) const
virtual void setyieldvalues(const std::string &yldname, const std::vector< int > &baseages, const std::vector< double > &values)
virtual double getlastvalue(const std::string yld) const
virtual size_t size() const
virtual void clearcache()
virtual FMTyldtype gettype() const
virtual double get(const std::string &yld, const FMTyieldrequest &request) const
virtual std::vector< std::string > getyieldnames() const
virtual std::unique_ptr< FMTyieldhandler > clone() const
virtual bool empty() const
virtual double getyieldlinearvalue(const std::string &yldname, const FMTyieldrequest &request, bool allowoutofrange=true) const
FMTageyieldhandler(const FMTyieldhandler &rhs)
FMTageyieldhandler()=default
FMTageyieldhandler(const FMTageyieldhandler &rhs)=default
Definition: FMTdata.hpp:32
Definition: FMTmask.hpp:96
Definition: FMTbounds.hpp:342
Definition: FMTyieldhandler.hpp:31
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