]>
Commit | Line | Data |
---|---|---|
7c673cae FG |
1 | // Copyright 2004 The Trustees of Indiana University. |
2 | ||
3 | // Distributed under the Boost Software License, Version 1.0. | |
4 | // (See accompanying file LICENSE_1_0.txt or copy at | |
5 | // http://www.boost.org/LICENSE_1_0.txt) | |
6 | ||
7 | // Authors: Douglas Gregor | |
8 | // Andrew Lumsdaine | |
9 | #ifndef BOOST_GRAPH_RANDOM_LAYOUT_HPP | |
10 | #define BOOST_GRAPH_RANDOM_LAYOUT_HPP | |
11 | ||
12 | #include <boost/graph/graph_traits.hpp> | |
13 | #include <boost/random/uniform_int.hpp> | |
14 | #include <boost/random/uniform_01.hpp> | |
15 | #include <boost/random/uniform_real.hpp> | |
16 | #include <boost/type_traits/is_integral.hpp> | |
17 | #include <boost/mpl/if.hpp> | |
18 | #include <boost/graph/iteration_macros.hpp> | |
19 | ||
20 | namespace boost { | |
21 | ||
22 | template<typename Topology, | |
23 | typename Graph, typename PositionMap> | |
24 | void | |
25 | random_graph_layout | |
26 | (const Graph& g, PositionMap position_map, | |
27 | const Topology& topology) | |
28 | { | |
29 | BGL_FORALL_VERTICES_T(v, g, Graph) { | |
30 | put(position_map, v, topology.random_point()); | |
31 | } | |
32 | } | |
33 | ||
34 | } // end namespace boost | |
35 | ||
36 | #endif // BOOST_GRAPH_RANDOM_LAYOUT_HPP |