8#ifndef FMTyieldmodelRando_Hm_included
9#define FMTyieldmodelRando_Hm_included
15#include <unordered_map>
56 const std::vector<FMTTheme>& p_newThemes)
const;
65 const std::vector<FMTTheme>& p_baseThemes)
const;
71 std::unique_ptr<FMTYieldModel>
clone()
const;
92 std::vector<size_t> _getNormalizedYields(
const std::vector<std::string>& p_yields,
const Core::FMTYieldRequest& p_request)
const;
99 double _getRandomIndex(
const std::vector<size_t>& p_distribution)
const;
108 mutable std::unordered_map<int,double>m_cache;
Filter built from masks used to preSolve and postsolve FMTMask objects.
Definition: FMTMaskFilter.h:31
Definition: FMTYieldModelRandom.h:26
std::unique_ptr< FMTYieldModel > postSolve(const FMTMaskFilter &p_filter, const std::vector< FMTTheme > &p_baseThemes) const
Postsolve the yieldmodel by default it will return a clone.
virtual void setModel(Models::FMTModel *p_modelPtr)
set The model to the yielmodel and change the seed.!
std::unique_ptr< FMTYieldModel > clone() const
clone this FMTYieldModel
std::unique_ptr< FMTYieldModel > preSolve(const FMTMaskFilter &p_filter, const std::vector< FMTTheme > &p_newThemes) const
If the FMTYieldModelRandom contains Core classes it also need to be presolved when presolved is calle...
void clearRandomYieldsCache() override
Flush the random number cache to redraw new random sequence.
FMTYieldModelRandom(const boost::property_tree::ptree &p_jsonProps, const std::vector< std::string > &p_distribution)
Main constructor for the random yield model.
const std::vector< double > predict(const Core::FMTYieldRequest &p_request) const
predict the yields values using this class.
static std::string getModelType()
Get the model type.
Abstract class to be implemented as a machine learning yield model.
Definition: FMTYieldModel.h:45
Request for yield values using a development and optionally a graph vertex.
Definition: FMTYieldRequest.h:37
Base class for the different models in FMT.
Definition: FMTModel.h:62
Definition: FMTYieldModel.h:30
The Core namespace provides classes for simulating stands/strata growth/harvest through time.
Definition: FMTAction.h:34