8#ifndef FMTCOMPLEXYIELDHANDLER_H_INCLUDED
9#define FMTCOMPLEXYIELDHANDLER_H_INCLUDED
14#include <boost/serialization/serialization.hpp>
15#include <boost/serialization/nvp.hpp>
22 friend class boost::serialization::access;
23 template<
class Archive>
24 void serialize(Archive& ar,
const unsigned int version)
26 ar & boost::serialization::make_nvp(
"FMTyieldhandler", boost::serialization::base_object<FMTyieldhandler>(*
this));
27 ar & BOOST_SERIALIZATION_NVP(elements);
29 std::map<std::string, FMTdata>elements;
30 std::map<std::string, double> getsources(
const std::map<std::string,
const std::unique_ptr<FMTyieldhandler>*>& srcdata,
32 std::map<std::string, const std::unique_ptr<FMTyieldhandler>*> getdata(
const FMTyieldrequest& request,
33 const std::vector<std::string>& names,
const std::string& original)
const;
34 std::vector<double>getsourcesarray(
const std::map<std::string,
const std::unique_ptr<FMTyieldhandler>*>& srcdata,
36 std::unique_ptr<FMTyieldhandler>toageyld(
const FMTyieldrequest& request,
37 const std::vector<std::string>& yieldnames,
const int& minage,
const int& maxage)
const;
38 std::unordered_set<size_t>overridetabou;
49 virtual operator std::string()
const;
56 virtual std::vector<std::string>
indexes(
const std::vector<std::string>& names)
const;
59 virtual bool push_data(
const std::string& yld,
const double& value);
61 virtual std::unique_ptr<FMTyieldhandler>
clone()
const;
64 virtual size_t size()
const;
67 virtual const FMTdata&
at(
const std::string& yldname)
const;
#define FMTEXPORT
Definition: FMTutility.hpp:92
Definition: FMTcomplexyieldhandler.hpp:21
virtual double getyieldlinearvalue(const std::string &yldname, const FMTyieldrequest &request, bool allowoutofrange=true) const
virtual void setoverrideindex(const size_t &newindex)
void settabou(const FMTcomplexyieldhandler &rhs)
virtual double get(const std::string &yld, const FMTyieldrequest &request) const
std::unique_ptr< FMTyieldhandler > complexyldtoageyld(const FMTyieldrequest &request, const FMTspec &lspec) const
FMTcomplexyieldhandler(const FMTcomplexyieldhandler &rhs)=default
virtual const FMTdata & at(const std::string &yldname) const
virtual bool empty() const
FMTcomplexyieldhandler(const FMTmask &mask)
virtual double getpeak(const FMTyieldrequest &request, const std::string &yld, const int &targetage) const
virtual void clearcache()
virtual int getage(const FMTyieldrequest &request, const FMTspec &spec) const
const std::map< std::string, FMTdata > & getdataelements() const
virtual std::unique_ptr< FMTyieldhandler > clone() const
virtual FMTdata & operator[](const std::string &yldname)
virtual FMTyldtype gettype() const
virtual int getlastbase() const
virtual bool push_data(const std::string &yld, const FMTdata &data)
virtual size_t getoverrideindex() const
std::vector< size_t > gettabous() const override
virtual std::vector< std::string > indexes(const std::vector< std::string > &names) const
virtual size_t size() const
virtual bool containsyield(const std::string &yldname) const
bool comparesources(const std::string &yield, const FMTcomplexyieldhandler &overridedyield) const
virtual std::vector< std::string > getyieldnames() const
virtual bool push_data(const std::string &yld, const double &value)
~FMTcomplexyieldhandler()=default
void settabou(const size_t &index)
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