8#ifndef FMTMASKFILTER_H_INCLUDED
9#define FMTMASKFILTER_H_INCLUDED
12#include <boost/dynamic_bitset.hpp>
13#include <boost/serialization/serialization.hpp>
14#include <boost/serialization/nvp.hpp>
16#include <boost/functional/hash.hpp>
28 friend class boost::serialization::access;
31 template<
class Archive>
32 void serialize(Archive& ar,
const unsigned int version)
35 ar & BOOST_SERIALIZATION_NVP(selection);
36 ar & BOOST_SERIALIZATION_NVP(flippedselection);
52 FMTmaskfilter(std::vector<FMTmask>& masks,
const std::vector<FMTtheme>& themes);
57 std::vector<Core::FMTtheme>
getselectedthemes(
const std::vector<Core::FMTtheme>& themes)
const;
60 return flippedselection.empty();
64 return selection.empty();
68 return (boost::hash<boost::dynamic_bitset<>>()(selection) ^ boost::hash<boost::dynamic_bitset<>>()(flippedselection));
79 struct hash<
Core::FMTmaskfilter>
84 return (filter.
hash());
#define FMTEXPORT
Definition: FMTutility.hpp:92
Definition: FMTmask.hpp:96
Definition: FMTmaskfilter.hpp:27
boost::dynamic_bitset flippedselection
Definition: FMTmaskfilter.hpp:42
FMTmaskfilter(std::vector< FMTmask > &masks, const std::vector< FMTtheme > &themes)
FMTmaskfilter(const FMTmask &presolveselection, const FMTmask &buffermask)
FMTmaskfilter(const FMTmaskfilter &rhs)
FMTmaskfilter presolve(const std::vector< FMTtheme > &themes) const
size_t hash() const
Definition: FMTmaskfilter.hpp:66
bool canpresolve(const FMTmask &mask, const std::vector< Core::FMTtheme > &themes) const
FMTmaskfilter(const FMTmask &presolveselection)
bool emptyflipped() const
Definition: FMTmaskfilter.hpp:58
FMTmaskfilter(std::vector< FMTmask > &masks)
FMTmask filter(const FMTmask &devmask) const
boost::dynamic_bitset selection
Definition: FMTmaskfilter.hpp:41
bool empty() const
Definition: FMTmaskfilter.hpp:62
virtual ~FMTmaskfilter()=default
std::vector< Core::FMTtheme > getselectedthemes(const std::vector< Core::FMTtheme > &themes) const
void swap(FMTmaskfilter &rhs)
Definition: FMTtheme.hpp:47
The Core namespace provides classes for simulating stands/strata growth/harvest through time.
Definition: FMTaction.hpp:31
Definition: FMTaction.hpp:364
std::size_t operator()(const Core::FMTmaskfilter &filter) const
Definition: FMTmaskfilter.hpp:81