Back to home page

EIC code displayed by LXR

 
 

    


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

0001 // Copyright (C) 2004-2008 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: Nick Edmonds
0008 //           Douglas Gregor
0009 //           Andrew Lumsdaine
0010 #ifndef BOOST_DISTRIBUTED_FILTERED_GRAPH_HPP
0011 #define BOOST_DISTRIBUTED_FILTERED_GRAPH_HPP
0012 
0013 #ifndef BOOST_GRAPH_USE_MPI
0014 #error "Parallel BGL files should not be included unless <boost/graph/use_mpi.hpp> has been included"
0015 #endif
0016 
0017 #include <boost/graph/parallel/process_group.hpp>
0018 #include <boost/graph/filtered_graph.hpp>
0019 
0020 namespace boost {
0021   namespace graph {
0022           namespace parallel {
0023       /// Retrieve the process group from a filtered graph
0024       template<typename Graph, typename EdgePredicate, typename VertexPredicate>
0025       struct process_group_type<filtered_graph<Graph, EdgePredicate, VertexPredicate> >
0026         : process_group_type<Graph> { };
0027 
0028       template<typename Graph, typename EdgePredicate, typename VertexPredicate>
0029       struct process_group_type<const filtered_graph<Graph, EdgePredicate, VertexPredicate> >
0030         : process_group_type<Graph> { };
0031     }
0032 
0033   }
0034 
0035   /// Retrieve the process group from a filtered graph
0036   template<typename Graph, typename EdgePredicate, typename VertexPredicate>
0037   inline typename graph::parallel::process_group_type<Graph>::type
0038   process_group(filtered_graph<Graph, EdgePredicate, VertexPredicate> const& g) {
0039     return process_group(g.m_g);
0040   }
0041 
0042   /// Forward vertex() to vertex() of the base graph 
0043   template <typename Graph, typename EdgePredicate, typename VertexPredicate>
0044   typename graph_traits<Graph>::vertex_descriptor
0045   vertex(typename graph_traits<Graph>::vertices_size_type i, 
0046          filtered_graph<Graph, EdgePredicate, VertexPredicate> const& g)
0047   { return vertex(i, g.m_g); }
0048 
0049 }
0050 
0051 #endif // BOOST_DISTRIBUTED_FILTERED_GRAPH_HPP