1 // Copyright 2004 The Trustees of Indiana University.
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)
7 // Authors: Douglas Gregor
9 #ifndef BOOST_GRAPH_RANDOM_LAYOUT_HPP
10 #define BOOST_GRAPH_RANDOM_LAYOUT_HPP
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>
22 template<typename Topology
,
23 typename Graph
, typename PositionMap
>
26 (const Graph
& g
, PositionMap position_map
,
27 const Topology
& topology
)
29 BGL_FORALL_VERTICES_T(v
, g
, Graph
) {
30 put(position_map
, v
, topology
.random_point());
34 } // end namespace boost
36 #endif // BOOST_GRAPH_RANDOM_LAYOUT_HPP