![]() |
FMT 0.9.8
Forest management tools for forest planning
|
#include <FMTmask.hpp>
Public Member Functions | |
| void | swap (FMTmask &rhs) |
| FMTmask () | |
| FMTmask (const FMTmask &rhs) | |
| virtual | ~FMTmask ()=default |
| FMTmask (const boost::dynamic_bitset<> &bits) | |
| operator bool () const | |
| FMTmask (const std::string &mask, const boost::dynamic_bitset<> &bits) | |
| FMTmask (const std::string &mask, const std::vector< FMTtheme > &themes) | |
| FMTmask (const std::vector< std::string > &values, const std::vector< FMTtheme > &themes) | |
| FMTmask (const std::vector< FMTtheme > &themes) | |
| void | clear () |
| size_t | size () const |
| size_t | count () const |
| std::string | get (const std::vector< FMTtheme > &themes) const |
| std::string | get (const FMTtheme &theme) const |
| size_t | getsubsetcount (const FMTtheme &theme) const |
| void | set (const std::vector< FMTtheme > &themes, const std::string &value) |
| void | set (const FMTtheme &theme, const std::string &value) |
| std::vector< FMTtheme > | getstaticthemes (const std::vector< FMTtheme > &themes) const |
| std::vector< FMTtheme > | getselectedthemes (const std::vector< FMTtheme > &themes) const |
| bool | isnotthemessubset (const FMTmask &rhs, const std::vector< FMTtheme > &themes) const |
| FMTmask | removeaggregates (const std::vector< FMTtheme > &themes, bool questionmarkonly=false) const |
| bool | empty () const |
| void | update (const std::vector< FMTtheme > &themes) |
| std::vector< FMTmask > | decompose (const FMTtheme &theme) const |
| void | append (const boost::dynamic_bitset<> &bits) |
| template<class typetobinarize > | |
| void | binarizedappend (const typetobinarize &element) |
| FMTmask | getunion (const FMTmask &rhs) const |
| FMTmask | getintersect (const FMTmask &rhs) const |
| boost::dynamic_bitset | getbitsetintersect (const FMTmask &rhs) const |
| FMTmask & | operator= (const FMTmask &rhs) |
| bool | operator!= (const FMTmask &rhs) const |
| bool | operator== (const FMTmask &rhs) const |
| bool | operator< (const FMTmask &rhs) const |
| FMTmask | resume (const boost::dynamic_bitset<> &rhs) const |
| FMTmask | resume (const std::vector< size_t > &indexes) const |
| size_t | hash () const |
| std::string | getbitsstring () const |
| operator std::string () const | |
| bool | issubsetof (const boost::dynamic_bitset<> &rhs) const |
| bool | issubsetof (const FMTmask &rhs) const |
| const boost::dynamic_bitset & | getbitsetreference () const |
| const std::string & | getstringreference () const |
| FMTmask | refine (const FMTmask &mask, const std::vector< FMTtheme > &themes) const |
| FMTmask | getpostsolvemask (const FMTmask &mask, const std::vector< FMTtheme > &themes) const |
| FMTmask | presolve (const FMTmaskfilter &filter, const std::vector< FMTtheme > &presolvedthemes) const |
| FMTmask | postsolve (const FMTmaskfilter &filter, const std::vector< FMTtheme > &basethemes) const |
| template<> | |
| void | binarizedappend (const double &element) |
Friends | |
| class | FMTtheme |
| class | boost::serialization::access |
FMTmask class is one of the most important class in FMT. Alot of classes are bases on FMTmask. data is boost:dynamic_bitset where if a bit is set that means that the attribute of a given theme is part of the FMTmask. the data member size == the sum of the FMTthemes size. The name data member hold the attribute value as a string. Sometime when the FMTmask is used for union the name might not be set. Also if multiple bits are set for a given FMTtheme it means that the mask contains a aggregate or a ?.
| Core::FMTmask::FMTmask | ( | ) |
Default constructor for FMTmask.
|
virtualdefault |
Default destructor for FMTmask.
| Core::FMTmask::FMTmask | ( | const boost::dynamic_bitset<> & | bits | ) |
Simple constructor for FMTmask that only sets the bitsets data member.
| Core::FMTmask::FMTmask | ( | const std::string & | mask, |
| const boost::dynamic_bitset<> & | bits | ||
| ) |
FMTmask constructor using a already sets bitset (bits) and a string mask to set as name.
| Core::FMTmask::FMTmask | ( | const std::string & | mask, |
| const std::vector< FMTtheme > & | themes | ||
| ) |
| Core::FMTmask::FMTmask | ( | const std::vector< std::string > & | values, |
| const std::vector< FMTtheme > & | themes | ||
| ) |
| Core::FMTmask::FMTmask | ( | const std::vector< FMTtheme > & | themes | ) |
| void Core::FMTmask::append | ( | const boost::dynamic_bitset<> & | bits | ) |
Append a bitsets to the bitset data member of the FMTmask.
|
inline |
|
inline |
Binarize any class and append it to the mask.
| void Core::FMTmask::clear | ( | ) |
Clear the data and name members.
| size_t Core::FMTmask::count | ( | ) | const |
Get the number of bits set.
Using a given (theme) this function desaggregate the attribute/aggregate/? of a theme from the FMTmask and returns a vector of each possible attribute as multiple masks.
| bool Core::FMTmask::empty | ( | ) | const |
Returns true if the data member is empty.
| std::string Core::FMTmask::get | ( | const FMTtheme & | theme | ) | const |
| std::string Core::FMTmask::get | ( | const std::vector< FMTtheme > & | themes | ) | const |
Gets the string mask name of the FMTmask based on the bitset data and the sorted themes.
| boost::dynamic_bitset Core::FMTmask::getbitsetintersect | ( | const FMTmask & | rhs | ) | const |
|
inline |
Get a const referencer ot the boost::dynamic_bitset data member.
| std::string Core::FMTmask::getbitsstring | ( | ) | const |
Returns the binary representation of the dynamic bitset in a simple string.
| FMTmask Core::FMTmask::getpostsolvemask | ( | const FMTmask & | mask, |
| const std::vector< FMTtheme > & | themes | ||
| ) | const |
If this is a base postsolve mask it uses mask to turn off bits for themes that are still active.
|
inline |
Get a const referencer ot the std::string data member.
| size_t Core::FMTmask::getsubsetcount | ( | const FMTtheme & | theme | ) | const |
Get the number of bits set for the given theme subset.
|
inline |
Hash function for the FMTmask class.
|
inline |
Check if the bitset is a subset of the rhs bitset
|
inline |
|
explicit |
Returns true if the FMTmask is not empty by looking at the data bitset.
|
inline |
Returns the name of the FMTmask.
| FMTmask Core::FMTmask::postsolve | ( | const FMTmaskfilter & | filter, |
| const std::vector< FMTtheme > & | basethemes | ||
| ) | const |
Using aFMTmaskfilter (filter) and the original FMTthemes it returns a postsolved FMTmask.
| FMTmask Core::FMTmask::presolve | ( | const FMTmaskfilter & | filter, |
| const std::vector< FMTtheme > & | presolvedthemes | ||
| ) | const |
Using a FMTmaskfilter (filter) and a subset of the original FMTthemes used to construct the FMTmask, it returns a presolved FMTmask with potentialy less data.
| FMTmask Core::FMTmask::refine | ( | const FMTmask & | mask, |
| const std::vector< FMTtheme > & | themes | ||
| ) | const |
It will return a new FMTmask where the ? are completed with the attribute for the theme from (mask). If the attribute is not ? for this mask, the attribute will not change.
| FMTmask Core::FMTmask::resume | ( | const boost::dynamic_bitset<> & | rhs | ) | const |
Using a mask (rhs) fix the corresponding resulting FMTmask with the selected name and data.
| FMTmask Core::FMTmask::resume | ( | const std::vector< size_t > & | indexes | ) | const |
Using a mask indexes (indexes) fix the corresponding resulting FMTmask with the selected name and data.
| void Core::FMTmask::set | ( | const FMTtheme & | theme, |
| const std::string & | value | ||
| ) |
Set the bitset data for a given FMTtheme (theme) for a attribute (value).
| void Core::FMTmask::set | ( | const std::vector< FMTtheme > & | themes, |
| const std::string & | value | ||
| ) |
Set the bitset data for some FMTthemes (themes) for a mask string (value).
| size_t Core::FMTmask::size | ( | ) | const |
Returns the size of the bitsets data member.
| void Core::FMTmask::update | ( | const std::vector< FMTtheme > & | themes | ) |
Update the name data member bass on the dynamic bitset data member with a sorted list of FMTtheme (themes).
|
friend |
Serialize function is for serialization, used to do multiprocessing across multiple cpus (pickle in Pyhton)
|
friend |