9#include <unordered_map>
16#ifndef FMTSPATIALNODESCACHE_H
17#define FMTSPATIALNODESCACHE_H
20 template<
class T1,
class T2>
21 class FMToutputnodecache;
37 std::unordered_map<int, double>periodicvalues;
38 bool worthintersecting;
39 boost::unordered_map<Core::FMTmask, double>patternvalues;
42 std::unordered_set<int>actions;
43 FMTnodecache() =
default;
45 ~FMTnodecache() =
default;
46 FMTnodecache(
const FMTnodecache& rhs) =
default;
47 FMTnodecache& operator = (
const FMTnodecache& rhs) =
default;
48 void setvalue(
const int& period,
const double& value);
49 void removeperiod(
const int& period);
51 void removevaluefromperiod(
const int& period,
const double& value);
52 void addvaluefromperiod(
const int& period,
const double& value);
53 bool gotcachevalue(
const int& period)
const;
54 double getcachevalue(
const int& period)
const;
56 FMTnodecache* actualcache;
60 typedef std::unordered_map<Core::FMToutputnode, FMTnodecache, Core::FMToutputnodehasher, Core::FMToutputnodevaluecomparator>
ucaching;
82 ucaching::iterator
end();
#define FMTEXPORT
Definition: FMTutility.hpp:92
Definition: FMTmask.hpp:96
Definition: FMToutputnode.hpp:20
Definition: FMToutputnodecache.hpp:27
Definition: FMTmodel.hpp:60
Definition: FMTspatialnodescache.hpp:33
bool isworthy(const Core::FMToutputnode &node) const
void setnodecache(ucaching::iterator cashit)
const std::vector< FMTcoordinate > & getnode(const Core::FMToutputnode &node, const Models::FMTmodel &model, bool &exactnode)
void setnode(const Core::FMToutputnode &node, const std::vector< FMTcoordinate > &coordinates)
void removeperiod(const int &period)
void set(const Core::FMToutputnode &node)
ucaching::iterator begin()
FMTspatialnodescache()=default
void insert(const FMTspatialnodescache &rhs)
FMTnodecache * getactualnodecache()
void erasenode(const Core::FMToutputnode &node)
std::unordered_map< Core::FMToutputnode, FMTnodecache, Core::FMToutputnodehasher, Core::FMToutputnodevaluecomparator > ucaching
Definition: FMTspatialnodescache.hpp:60
void swap(FMTspatialnodescache &rhs)
FMTspatialnodescache(const std::vector< FMTcoordinate > &mapping)
FMTspatialnodescache(const FMTspatialnodescache &rhs)
Namespace for using/building unidirectional graphs in FMT.
Definition: FMTareaparser.hpp:31
Namespace containing all enumerator and classes used to construct or manipulate the different type of...
Definition: FMTareaparser.hpp:50
The spatial namespace provides classes for spatialy explicit simulation/optimization based on raster ...
Definition: FMTareaparser.hpp:36