Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 09:37:36

0001 // Copyright 2004 The Trustees of Indiana University.
0002 
0003 // Distributed under the Boost Software License, Version 1.0.
0004 // (See accompanying file LICENSE_1_0.txt or copy at
0005 // http://www.boost.org/LICENSE_1_0.txt)
0006 
0007 //  Authors: Douglas Gregor
0008 //           Andrew Lumsdaine
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 } // end namespace boost
0034 
0035 #endif // BOOST_GRAPH_RANDOM_LAYOUT_HPP