FMT 1.2.0
Forest management tools for forest planning
Loading...
Searching...
No Matches
FMTPredictor.h
Go to the documentation of this file.
1/*
2Copyright (c) 2019 Gouvernement du Québec
3
4SPDX-License-Identifier: LiLiQ-R-1.1
5License-Filename: LICENSES/EN/LiLiQ-R11unicode.txt
6*/
7#ifndef FMTPREDICTOR_H
8#define FMTPREDICTOR_H
9
10
11#include <vector>
12#include <string>
13#include <map>
14#include "FMTutility.h"
15
16
17
18namespace Core
19{
20 class FMTYields;
21 class FMTAction;
22}
23
24namespace Graph
25{
26 class FMTBaseVertexProperties;
27 class FMTBaseEdgeProperties;
28 // DocString: FMTPredictor
33 {
34 public:
35 // DocString: FMTPredictor()
40 // DocString: ~FMTPredictor()
44 ~FMTPredictor() = default;
45 // DocString: FMTPredictor(...)
57 FMTPredictor(const std::vector<Core::FMTAction>& actions, const std::vector<std::string>& yieldnames,const Core::FMTYields& yields,
58 const FMTBaseVertexProperties& source, const FMTBaseVertexProperties& target, const std::vector<const FMTBaseEdgeProperties*>& edges, const std::vector<int>& gaps,bool withGCBMid = true);
59 // DocString: FMTPredictor(const FMTPredictor&)
65 // DocString: FMTPredictor::operator=
71 FMTPredictor& operator = (const FMTPredictor& rhs);
72 // DocString: FMTPredictor::operator==
78 bool operator==(const FMTPredictor& rhs) const;
79 // DocString: FMTPredictor::operator<
85 bool operator<(const FMTPredictor& rhs) const;
86 // DocString: FMTPredictor::getPredictors
91 std::vector<double>getPredictors() const;
92 // DocString: FMTPredictor::getDistance
98 double getDistance(size_t actId) const;
99 // DocString: FMTPredictor::getDisturbance
105 double getDisturbance(size_t actId) const;
106 // DocString: FMTPredictor::getSourceAge
111 double getSourceAge() const;
112 // DocString: FMTPredictor::getSourceYields
117 std::vector<double> getSourceYields() const;
118 // DocString: FMTPredictor::getTargetAge
123 double getTargetAge() const;
124 // DocString: FMTPredictor::getTargetYields
129 std::vector<double> getTargetYields() const;
130 // DocString: FMTPredictor::getPredictorNames
136 std::vector<std::string>getPredictorNames(const std::vector<std::string>& yieldnames)const;
137 private:
138 const FMTBaseVertexProperties* m_source_vertex;
139 const FMTBaseVertexProperties* m_target_vertex;
140 std::vector<double>m_source_yields;
141 std::vector<double>m_target_yields;
142 std::vector<int>m_periodgaps;
143 std::vector<int>m_sourceactions;
144 // DocString: FMTPredictor::_getYields
152 std::vector<double>_getYields(const FMTBaseVertexProperties& vertex, const Core::FMTYields& yields, const std::vector<std::string>& yieldnames) const;
153 };
154}
155
156#endif // predictor
#define FMTEXPORT
Definition: FMTutility.h:125
FMTList containing multiple yield handlers as seen in the yield section, holding the information rela...
Definition: FMTYields.h:44
Definition: FMTBaseVertexProperties.h:33
Predictor gathering the source and target ages, yields, distances and disturbances of a graph transit...
Definition: FMTPredictor.h:33
FMTPredictor(const std::vector< Core::FMTAction > &actions, const std::vector< std::string > &yieldnames, const Core::FMTYields &yields, const FMTBaseVertexProperties &source, const FMTBaseVertexProperties &target, const std::vector< const FMTBaseEdgeProperties * > &edges, const std::vector< int > &gaps, bool withGCBMid=true)
Construct a FMTPredictor from the source and target vertices of a graph transition and the edges betw...
FMTPredictor(const FMTPredictor &rhs)
Copy constructor for FMTPredictor.
FMTPredictor()
Default constructor for FMTPredictor.
~FMTPredictor()=default
Default destructor for FMTPredictor.
double getSourceAge() const
Return the age of the source vertex.
std::vector< double > getPredictors() const
Return the predictor values.
std::vector< std::string > getPredictorNames(const std::vector< std::string > &yieldnames) const
Return the names of the predictors.
bool operator<(const FMTPredictor &rhs) const
Less than operator for FMTPredictor.
double getTargetAge() const
Return the age of the target vertex.
std::vector< double > getTargetYields() const
Return the yields of the target vertex.
std::vector< double > getSourceYields() const
Return the yields of the source vertex.
bool operator==(const FMTPredictor &rhs) const
Comparison operator for FMTPredictor.
double getDisturbance(size_t actId) const
Return the disturbance of an action.
double getDistance(size_t actId) const
Return the distance to an action.
The Core namespace provides classes for simulating stands/strata growth/harvest through time.
Definition: FMTAction.h:34
Definition: FMTAreaParser.h:35