#include <lemon/hypercube_graph.h>
std::accumulate
so it accumulates the bf
binary function with the fv
first value. The map accumulates only on that dimensions where the node's index is one. The accumulated values should be given by the begin
and end
iterators and this range's length should be the dimension number of the graph.
const int DIM = 3; HyperCubeGraph graph(DIM); xy<double> base[DIM]; for (int k = 0; k < DIM; ++k) { base[k].x = rand() / (RAND_MAX + 1.0); base[k].y = rand() / (RAND_MAX + 1.0); } HyperCubeGraph::HyperMap<xy<double> > pos(graph, base, base + DIM, xy<double>(0.0, 0.0));
Public Member Functions | |
template<typename It> | |
HyperMap (const Graph &graph, It begin, It end, T fv=0.0, const BF &bf=BF()) | |
Constructor for HyperMap. | |
Value | operator[] (Key k) const |
Gives back the partial accumulated value. |
|
Construct a HyperMap for the given graph. The accumulated values should be given by the
This function accumulates the |
|
Gives back the partial accumulated value. |