PageRenderTime 13ms CodeModel.GetById 8ms app.highlight 3ms RepoModel.GetById 1ms app.codeStats 0ms

/Src/Dependencies/Boost/boost/graph/random_layout.hpp

http://hadesmem.googlecode.com/
C++ Header | 36 lines | 23 code | 7 blank | 6 comment | 0 complexity | 70ead0981065422a85d2a4e8859453c8 MD5 | raw file
 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
20namespace boost {
21
22template<typename Topology,
23         typename Graph, typename PositionMap>
24void
25random_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