Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 09:37:12

0001 // Copyright (C) 2004-2006 The Trustees of Indiana University.
0002 
0003 // Use, modification and distribution is subject to the Boost Software
0004 // License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
0005 // http://www.boost.org/LICENSE_1_0.txt)
0006 
0007 //  Authors: Douglas Gregor
0008 //           Andrew Lumsdaine
0009 #ifndef BOOST_GRAPH_PARALLEL_DIJKSTRA_DETAIL_HPP
0010 #define BOOST_GRAPH_PARALLEL_DIJKSTRA_DETAIL_HPP
0011 
0012 #ifndef BOOST_GRAPH_USE_MPI
0013 #error "Parallel BGL files should not be included unless <boost/graph/use_mpi.hpp> has been included"
0014 #endif
0015 
0016 #include <boost/property_map/property_map.hpp>
0017 #include <boost/property_map/parallel/parallel_property_maps.hpp>
0018 
0019 namespace boost { namespace graph { namespace distributed { namespace detail {
0020 
0021 /**********************************************************************
0022  * Dijkstra queue message data                                        *
0023  **********************************************************************/
0024 template<typename DistanceMap, typename PredecessorMap>
0025 class dijkstra_msg_value
0026 {
0027   typedef typename property_traits<DistanceMap>::value_type distance_type;
0028   typedef typename property_traits<PredecessorMap>::value_type
0029     predecessor_type;
0030 
0031 public:
0032   typedef std::pair<distance_type, predecessor_type> type;
0033 
0034   static type create(distance_type dist, predecessor_type pred)
0035   { return std::make_pair(dist, pred); }
0036 };
0037 
0038 template<typename DistanceMap>
0039 class dijkstra_msg_value<DistanceMap, dummy_property_map>
0040 {
0041   typedef typename property_traits<DistanceMap>::key_type vertex_descriptor;
0042 public:
0043   typedef typename property_traits<DistanceMap>::value_type type;
0044 
0045   static type create(type dist, vertex_descriptor) { return dist; }
0046 };
0047 /**********************************************************************/
0048 
0049 } } } } // end namespace boost::graph::distributed::detail
0050 
0051 #endif // BOOST_GRAPH_PARALLEL_DIJKSTRA_DETAIL_HPP