1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/epoc32/include/stdapis/boost/graph/profile.hpp Tue Mar 16 16:12:26 2010 +0000
1.3 @@ -0,0 +1,43 @@
1.4 +//
1.5 +//=======================================================================
1.6 +// Copyright 2002 Marc Wintermantel (wintermantel@even-ag.ch)
1.7 +// ETH Zurich, Center of Structure Technologies (www.imes.ethz.ch/st)
1.8 +//
1.9 +// Distributed under the Boost Software License, Version 1.0. (See
1.10 +// accompanying file LICENSE_1_0.txt or copy at
1.11 +// http://www.boost.org/LICENSE_1_0.txt)
1.12 +//=======================================================================
1.13 +
1.14 +#ifndef BOOST_GRAPH_PROFILE_HPP
1.15 +#define BOOST_GRAPH_PROFILE_HPP
1.16 +
1.17 +#include <boost/graph/graph_traits.hpp>
1.18 +#include <boost/detail/numeric_traits.hpp>
1.19 +#include <boost/graph/bandwidth.hpp>
1.20 +
1.21 +namespace boost {
1.22 +
1.23 + template <typename Graph, typename VertexIndexMap>
1.24 + typename graph_traits<Graph>::vertices_size_type
1.25 + profile(const Graph& g, VertexIndexMap index)
1.26 + {
1.27 + typename graph_traits<Graph>::vertices_size_type b = 0;
1.28 + typename graph_traits<Graph>::vertex_iterator i, end;
1.29 + for (tie(i, end) = vertices(g); i != end; ++i){
1.30 + b += ith_bandwidth(*i, g, index) + 1;
1.31 + }
1.32 +
1.33 + return b;
1.34 + }
1.35 +
1.36 + template <typename Graph>
1.37 + typename graph_traits<Graph>::vertices_size_type
1.38 + profile(const Graph& g)
1.39 + {
1.40 + return profile(g, get(vertex_index, g));
1.41 + }
1.42 +
1.43 +
1.44 +} // namespace boost
1.45 +
1.46 +#endif // BOOST_GRAPH_PROFILE_HPP