This map makes possible to give back a linear combination for each node. It works like the std::accumulate function, so it accumulates the bf binary function with the fv first value. The map accumulates only on that positions (dimensions) where the index of the node is one. The values that have to be accumulated should be given by the begin and end iterators and the length of this range should be equal to the dimension number of the graph.
#include <lemon/hypercube_graph.h>
Public Types | |
| typedef Node | Key |
| The key type of the map. | |
| typedef T | Value |
| The value type of the map. | |
Public Member Functions | |
| template<typename It > | |
| HyperMap (const Graph &graph, It begin, It end, T fv=0, const BF &bf=BF()) | |
| Constructor for HyperMap. More... | |
| Value | operator[] (const Key &k) const |
| The partial accumulated value. More... | |
|
inline |
Construct a HyperMap for the given graph. The values that have to be accumulated should be given by the begin and end iterators and the length of this range should be equal to the dimension number of the graph.
This map accumulates the bf binary function with the fv first value on that positions (dimensions) where the index of the node is one.
1.8.5