reverse_graph.hpp 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. // Copyright (C) 2005-2006 The Trustees of Indiana University.
  2. // Use, modification and distribution is subject to the Boost Software
  3. // License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
  4. // http://www.boost.org/LICENSE_1_0.txt)
  5. // Authors: Nick Edmonds
  6. // Andrew Lumsdaine
  7. #ifndef BOOST_GRAPH_DISTRIBUTED_REVERSE_GRAPH_HPP
  8. #define BOOST_GRAPH_DISTRIBUTED_REVERSE_GRAPH_HPP
  9. #ifndef BOOST_GRAPH_USE_MPI
  10. #error "Parallel BGL files should not be included unless <boost/graph/use_mpi.hpp> has been included"
  11. #endif
  12. #include <boost/graph/reverse_graph.hpp>
  13. #include <boost/graph/parallel/container_traits.hpp>
  14. namespace boost {
  15. namespace graph {
  16. namespace parallel {
  17. /// Retrieve the process group from a reverse graph
  18. template<typename Graph, typename GraphRef>
  19. struct process_group_type<reverse_graph<Graph, GraphRef> >
  20. : process_group_type<Graph> { };
  21. }
  22. }
  23. /// Retrieve the process group from a reverse graph
  24. template<typename Graph, typename GraphRef>
  25. inline typename graph::parallel::process_group_type<Graph>::type
  26. process_group(reverse_graph<Graph, GraphRef> const& g) {
  27. return process_group(g.m_g);
  28. }
  29. } // namespace boost
  30. #endif