]> git.proxmox.com Git - ceph.git/blob - ceph/src/boost/boost/graph/random_layout.hpp
update source to Ceph Pacific 16.2.2
[ceph.git] / ceph / src / boost / boost / graph / random_layout.hpp
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
23 template < typename Topology, typename Graph, typename PositionMap >
24 void random_graph_layout(
25 const Graph& g, PositionMap position_map, const Topology& topology)
26 {
27 BGL_FORALL_VERTICES_T(v, g, Graph)
28 {
29 put(position_map, v, topology.random_point());
30 }
31 }
32
33 } // end namespace boost
34
35 #endif // BOOST_GRAPH_RANDOM_LAYOUT_HPP