Mercurial > hg > vamp-build-and-test
annotate DEPENDENCIES/generic/include/boost/graph/random_layout.hpp @ 133:4acb5d8d80b6 tip
Don't fail environmental check if README.md exists (but .txt and no-suffix don't)
author | Chris Cannam |
---|---|
date | Tue, 30 Jul 2019 12:25:44 +0100 |
parents | 2665513ce2d3 |
children |
rev | line source |
---|---|
Chris@16 | 1 // Copyright 2004 The Trustees of Indiana University. |
Chris@16 | 2 |
Chris@16 | 3 // Distributed under the Boost Software License, Version 1.0. |
Chris@16 | 4 // (See accompanying file LICENSE_1_0.txt or copy at |
Chris@16 | 5 // http://www.boost.org/LICENSE_1_0.txt) |
Chris@16 | 6 |
Chris@16 | 7 // Authors: Douglas Gregor |
Chris@16 | 8 // Andrew Lumsdaine |
Chris@16 | 9 #ifndef BOOST_GRAPH_RANDOM_LAYOUT_HPP |
Chris@16 | 10 #define BOOST_GRAPH_RANDOM_LAYOUT_HPP |
Chris@16 | 11 |
Chris@16 | 12 #include <boost/graph/graph_traits.hpp> |
Chris@16 | 13 #include <boost/random/uniform_int.hpp> |
Chris@16 | 14 #include <boost/random/uniform_01.hpp> |
Chris@16 | 15 #include <boost/random/uniform_real.hpp> |
Chris@16 | 16 #include <boost/type_traits/is_integral.hpp> |
Chris@16 | 17 #include <boost/mpl/if.hpp> |
Chris@16 | 18 #include <boost/graph/iteration_macros.hpp> |
Chris@16 | 19 |
Chris@16 | 20 namespace boost { |
Chris@16 | 21 |
Chris@16 | 22 template<typename Topology, |
Chris@16 | 23 typename Graph, typename PositionMap> |
Chris@16 | 24 void |
Chris@16 | 25 random_graph_layout |
Chris@16 | 26 (const Graph& g, PositionMap position_map, |
Chris@16 | 27 const Topology& topology) |
Chris@16 | 28 { |
Chris@16 | 29 BGL_FORALL_VERTICES_T(v, g, Graph) { |
Chris@16 | 30 put(position_map, v, topology.random_point()); |
Chris@16 | 31 } |
Chris@16 | 32 } |
Chris@16 | 33 |
Chris@16 | 34 } // end namespace boost |
Chris@16 | 35 |
Chris@16 | 36 #endif // BOOST_GRAPH_RANDOM_LAYOUT_HPP |