274 /// first value. The map accumulates only on that dimensions where |
274 /// first value. The map accumulates only on that dimensions where |
275 /// the node's index is one. The accumulated values should be |
275 /// the node's index is one. The accumulated values should be |
276 /// given by the \c begin and \c end iterators and this range's length |
276 /// given by the \c begin and \c end iterators and this range's length |
277 /// should be the dimension number of the graph. |
277 /// should be the dimension number of the graph. |
278 /// |
278 /// |
279 /// \code |
279 ///\code |
280 /// const int DIM = 3; |
280 /// const int DIM = 3; |
281 /// HyperCubeGraph graph(DIM); |
281 /// HyperCubeGraph graph(DIM); |
282 /// xy<double> base[DIM]; |
282 /// xy<double> base[DIM]; |
283 /// for (int k = 0; k < DIM; ++k) { |
283 /// for (int k = 0; k < DIM; ++k) { |
284 /// base[k].x = rand() / (RAND_MAX + 1.0); |
284 /// base[k].x = rand() / (RAND_MAX + 1.0); |
285 /// base[k].y = rand() / (RAND_MAX + 1.0); |
285 /// base[k].y = rand() / (RAND_MAX + 1.0); |
286 /// } |
286 /// } |
287 /// HyperCubeGraph::HyperMap<xy<double> > |
287 /// HyperCubeGraph::HyperMap<xy<double> > |
288 /// pos(graph, base, base + DIM, xy<double>(0.0, 0.0)); |
288 /// pos(graph, base, base + DIM, xy<double>(0.0, 0.0)); |
289 /// \endcode |
289 ///\endcode |
290 /// |
290 /// |
291 /// \see HyperCubeGraph |
291 /// \see HyperCubeGraph |
292 template <typename T, typename BF = std::plus<T> > |
292 template <typename T, typename BF = std::plus<T> > |
293 class HyperMap { |
293 class HyperMap { |
294 public: |
294 public: |