FMT 0.9.8
Forest management tools for forest planning
Loading...
Searching...
No Matches
FMTedgeproperties.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#ifndef FMTedgeproperties_H_INCLUDED
9#define FMTedgeproperties_H_INCLUDED
10
11#include <boost/serialization/serialization.hpp>
12#include <boost/serialization/nvp.hpp>
13#include <vector>
14#include <string>
16
17namespace Graph
18 {
20 {
22 template<class Archive>
23 void serialize(Archive& ar, const unsigned int version)
24 {
25 ar & boost::serialization::make_nvp("FMTbaseedgeproperties", boost::serialization::base_object<FMTbaseedgeproperties>(*this));
26 ar & BOOST_SERIALIZATION_NVP(variableID);
27 ar & BOOST_SERIALIZATION_NVP(proportion);
28 }
29 int variableID;
30 float proportion;
31 public:
36 inline int getvariableID() const override
37 {
38 return variableID;
39 }
40 void setvariableID(const int& newvariableID);
41 inline double getproportion() const override
42 {
43 return static_cast<double>(proportion);
44 }
45 FMTedgeproperties(const int& laction,
46 const int& lvariableID,
47 const double& lproportion);
48 bool operator == (const FMTedgeproperties& rhs) const;
49 bool operator != (const FMTedgeproperties& rhs) const;
50 inline std::string variablename() const;
51 inline const int* getvariableptr() const
52 {
53 return &variableID;
54 }
55
56 };
57 }
58
59BOOST_CLASS_EXPORT_KEY(Graph::FMTedgeproperties)
60
61#endif
Definition: FMTbaseedgeproperties.hpp:26
Definition: FMTedgeproperties.hpp:20
bool operator!=(const FMTedgeproperties &rhs) const
const int * getvariableptr() const
Definition: FMTedgeproperties.hpp:51
int getvariableID() const override
Definition: FMTedgeproperties.hpp:36
std::string variablename() const
void setvariableID(const int &newvariableID)
FMTedgeproperties(const FMTedgeproperties &rhs)=default
FMTedgeproperties & operator=(const FMTedgeproperties &rhs)=default
friend class boost::serialization::access
Definition: FMTedgeproperties.hpp:21
FMTedgeproperties(const int &laction, const int &lvariableID, const double &lproportion)
bool operator==(const FMTedgeproperties &rhs) const
double getproportion() const override
Definition: FMTedgeproperties.hpp:41
Namespace for using/building unidirectional graphs in FMT.
Definition: FMTareaparser.hpp:31