sl@0: // sl@0: //======================================================================= sl@0: // Copyright 2002 Marc Wintermantel (wintermantel@even-ag.ch) sl@0: // ETH Zurich, Center of Structure Technologies (www.imes.ethz.ch/st) sl@0: // sl@0: // Distributed under the Boost Software License, Version 1.0. (See sl@0: // accompanying file LICENSE_1_0.txt or copy at sl@0: // http://www.boost.org/LICENSE_1_0.txt) sl@0: //======================================================================= sl@0: sl@0: #ifndef BOOST_GRAPH_PROFILE_HPP sl@0: #define BOOST_GRAPH_PROFILE_HPP sl@0: sl@0: #include sl@0: #include sl@0: #include sl@0: sl@0: namespace boost { sl@0: sl@0: template sl@0: typename graph_traits::vertices_size_type sl@0: profile(const Graph& g, VertexIndexMap index) sl@0: { sl@0: typename graph_traits::vertices_size_type b = 0; sl@0: typename graph_traits::vertex_iterator i, end; sl@0: for (tie(i, end) = vertices(g); i != end; ++i){ sl@0: b += ith_bandwidth(*i, g, index) + 1; sl@0: } sl@0: sl@0: return b; sl@0: } sl@0: sl@0: template sl@0: typename graph_traits::vertices_size_type sl@0: profile(const Graph& g) sl@0: { sl@0: return profile(g, get(vertex_index, g)); sl@0: } sl@0: sl@0: sl@0: } // namespace boost sl@0: sl@0: #endif // BOOST_GRAPH_PROFILE_HPP