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); dim2::Point<double> base[DIM]; for (int k = 0; k < DIM; ++k) { base[k].x = rnd(); base[k].y = rnd(); } HyperCubeGraph::HyperMap<dim2::Point<double> > pos(graph, base, base + DIM, dim2::Point<double>(0.0, 0.0));
#include <lemon/hypercube_graph.h>
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 |
HyperMap | ( | const Graph & | graph, | |
It | begin, | |||
It | end, | |||
T | fv = 0.0 , |
|||
const BF & | bf = BF() | |||
) | [inline] |
Construct a HyperMap for the given graph. 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.
This function accumulates the bf
binary function with the fv
first value. The map accumulates only on that dimensions where the node's index is one.
Value operator[] | ( | Key | k | ) | const [inline] |
Gives back the partial accumulated value.