File indexing completed on 2025-01-18 09:37:36
0001
0002
0003
0004
0005
0006
0007
0008
0009 #ifndef BOOST_GRAPH_RANDOM_LAYOUT_HPP
0010 #define BOOST_GRAPH_RANDOM_LAYOUT_HPP
0011
0012 #include <boost/graph/graph_traits.hpp>
0013 #include <boost/random/uniform_int.hpp>
0014 #include <boost/random/uniform_01.hpp>
0015 #include <boost/random/uniform_real.hpp>
0016 #include <boost/type_traits/is_integral.hpp>
0017 #include <boost/mpl/if.hpp>
0018 #include <boost/graph/iteration_macros.hpp>
0019
0020 namespace boost
0021 {
0022
0023 template < typename Topology, typename Graph, typename PositionMap >
0024 void random_graph_layout(
0025 const Graph& g, PositionMap position_map, const Topology& topology)
0026 {
0027 BGL_FORALL_VERTICES_T(v, g, Graph)
0028 {
0029 put(position_map, v, topology.random_point());
0030 }
0031 }
0032
0033 }
0034
0035 #endif