1 // Copyright (C) 2004-2006 The Trustees of Indiana University.
3 // Use, modification and distribution is subject to the Boost Software
4 // License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
5 // http://www.boost.org/LICENSE_1_0.txt)
7 // Authors: Douglas Gregor
9 #ifndef BOOST_GRAPH_PARALLEL_DIJKSTRA_DETAIL_HPP
10 #define BOOST_GRAPH_PARALLEL_DIJKSTRA_DETAIL_HPP
12 #ifndef BOOST_GRAPH_USE_MPI
13 #error "Parallel BGL files should not be included unless <boost/graph/use_mpi.hpp> has been included"
16 #include <boost/property_map/property_map.hpp>
18 namespace boost { namespace graph { namespace distributed { namespace detail {
20 /**********************************************************************
21 * Dijkstra queue message data *
22 **********************************************************************/
23 template<typename DistanceMap, typename PredecessorMap>
24 class dijkstra_msg_value
26 typedef typename property_traits<DistanceMap>::value_type distance_type;
27 typedef typename property_traits<PredecessorMap>::value_type
31 typedef std::pair<distance_type, predecessor_type> type;
33 static type create(distance_type dist, predecessor_type pred)
34 { return std::make_pair(dist, pred); }
37 template<typename DistanceMap>
38 class dijkstra_msg_value<DistanceMap, dummy_property_map>
40 typedef typename property_traits<DistanceMap>::key_type vertex_descriptor;
42 typedef typename property_traits<DistanceMap>::value_type type;
44 static type create(type dist, vertex_descriptor) { return dist; }
46 /**********************************************************************/
48 } } } } // end namespace boost::graph::distributed::detail
50 #endif // BOOST_GRAPH_PARALLEL_DIJKSTRA_DETAIL_HPP