FMT 0.9.8
Forest management tools for forest planning
Loading...
Searching...
No Matches
FMToperatingareacluster.hpp
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
8#ifdef FMTWITHOSI
9
10#ifndef FMToperatingareacluster_H_INCLUDED
11#define FMToperatingareacluster_H_INCLUDED
12
14#include <boost/serialization/serialization.hpp>
15#include <boost/serialization/nvp.hpp>
16#include <boost/serialization/export.hpp>
17#include <vector>
18
19namespace Heuristics
20{
21 // DocString: FMToperatingareacluster
28 {
29 friend class boost::serialization::access;
30 // DocString: FMToperatingareacluster:serialize
34 template<class Archive>
35 void serialize(Archive& ar, const unsigned int version)
36 {
37 ar & BOOST_SERIALIZATION_NVP(maxvar);
38 ar & BOOST_SERIALIZATION_NVP(minvar);
39 ar & BOOST_SERIALIZATION_NVP(minimalarea);
40 ar & BOOST_SERIALIZATION_NVP(maximalarea);
41 ar & BOOST_SERIALIZATION_NVP(binaries);
42 ar & BOOST_SERIALIZATION_NVP(centroid);
43 }
44 // DocString: FMToperatingareacluster::maxvar
46 int maxvar;
47 // DocString: FMToperatingareacluster::minvar
49 int minvar;
50 // DocString: FMToperatingareacluster::minimalarea
52 double minimalarea;
53 // DocString: FMToperatingareacluster::maximalarea
55 double maximalarea;
56 // DocString: FMToperatingareacluster::binaries
58 std::vector<FMToperatingareaclusterbinary>binaries;
59 // DocString: FMToperatingareacluster::centroid
62 public:
63 // DocString: FMToperatingareacluster::FMToperatingareacluster()
68 // DocString: FMToperatingareacluster::FMToperatingareacluster(const FMToperatingareaclusterbinary&,const std::vector<FMToperatingareaclusterbinary>&)
73 const std::vector<FMToperatingareaclusterbinary>& neighborsbinaries);
74 // DocString: FMToperatingareacluster::FMToperatingareacluster(const FMToperatingareacluster&,const double&,const double&)
80 const double& lminimalarea,
81 const double& lmaximalarea);
82 // DocString: FMToperatingareacluster::FMToperatingareacluster(const FMToperatingareacluster&)
87 // DocString: FMToperatingareacluster::operator=
91 FMToperatingareacluster& operator = (const FMToperatingareacluster&) = default;
92 // DocString: FMToperatingareacluster::~FMToperatingareacluster()
97 // DocString: FMToperatingareacluster::getbinary
102 // DocString: FMToperatingareacluster::getcentroid
107 {
108 return centroid;
109 }
110 // DocString: FMToperatingareacluster::getbinaries
114 inline std::vector<FMToperatingareaclusterbinary> getbinaries() const
115 {
116 return binaries;
117 }
118 // DocString: FMToperatingareacluster::getmaximalobjectivevariable
123 {
124 return maxvar;
125 }
126 // DocString: FMToperatingareacluster::getminimalobjectivevariable
131 {
132 return minvar;
133 }
134 // DocString: FMToperatingareacluster::getminimalarea
138 double getminimalarea() const;
139 // DocString: FMToperatingareacluster::getmaximalarea
143 double getmaximalarea() const;
144 // DocString: FMToperatingareacluster::getmaximalstats
148 double getmaximalstats() const;
149 // DocString: FMToperatingareacluster::getrealminimalarea
153 inline double getrealminimalarea() const
154 {
155 return minimalarea;
156 }
157 // DocString: FMToperatingareacluster::getrealmaximalarea
161 inline double getrealmaximalarea() const
162 {
163 return maximalarea;
164 }
165 // DocString: FMToperatingareacluster::gettotalpotentialarea
169 double gettotalpotentialarea() const;
170 // DocString: FMToperatingareacluster::isvalidarea
174 bool isvalidarea(const double& area) const;
175 // DocString: FMToperatingareacluster::setmaximalobjectivevariable
179 void setmaximalobjectivevariable(const int& lmaxvar);
180 // DocString: FMToperatingareacluster::setminimalobjectivevariable
184 void setminimalobjectivevariable(const int& lminvar);
185 // DocString: FMToperatingareacluster::setminimalarea
189 void setminimalarea(const double& newminimalarea);
190 // DocString: FMToperatingareacluster::setmaximalarea
194 void setmaximalarea(const double& newmaximalarea);
195 // DocString: FMToperatingareacluster::isvalidareabounds
199 bool isvalidareabounds() const;
200 // DocString: FMToperatingareacluster::getfilteredcluster
206 // DocString: FMToperatingareacluster::getallmasks
210 std::vector<Core::FMTmask>getallmasks() const;
211 };
212}
213
214BOOST_CLASS_EXPORT_KEY(Heuristics::FMToperatingareacluster)
215#endif
216#endif
#define FMTEXPORT
Definition: FMTutility.hpp:92
Definition: FMTmask.hpp:96
Definition: FMToperatingareacluster.hpp:28
double getrealminimalarea() const
Definition: FMToperatingareacluster.hpp:153
FMToperatingareacluster getfilteredcluster(const Core::FMTmask &filtermask) const
void setmaximalobjectivevariable(const int &lmaxvar)
int getminimalobjectivevariable() const
Definition: FMToperatingareacluster.hpp:130
std::vector< FMToperatingareaclusterbinary > getbinaries() const
Definition: FMToperatingareacluster.hpp:114
bool isvalidarea(const double &area) const
FMToperatingareacluster(const FMToperatingareaclusterbinary &localcentroid, const std::vector< FMToperatingareaclusterbinary > &neighborsbinaries)
FMToperatingareacluster(const FMToperatingareacluster &basecluster, const double &lminimalarea, const double &lmaximalarea)
const FMToperatingareaclusterbinary & getbinary(const Core::FMTmask &mask) const
void setmaximalarea(const double &newmaximalarea)
FMToperatingareaclusterbinary getcentroid() const
Definition: FMToperatingareacluster.hpp:106
void setminimalobjectivevariable(const int &lminvar)
FMToperatingareacluster(const FMToperatingareacluster &)=default
void setminimalarea(const double &newminimalarea)
double getrealmaximalarea() const
Definition: FMToperatingareacluster.hpp:161
std::vector< Core::FMTmask > getallmasks() const
int getmaximalobjectivevariable() const
Definition: FMToperatingareacluster.hpp:122
Definition: FMToperatingareaclusterbinary.hpp:33
Namespace regrouping all tools for solving LP/MIP problems using an heuristic.
Definition: FMTareaparser.hpp:43