PGROUTING  3.2
pgr_transitiveClosure.hpp
Go to the documentation of this file.
1 /*PGR-GNU*****************************************************************
2 File: pgr_contract.hpp
3 
4 Generated with Template by:
5 Copyright (c) 2015 pgRouting developers
7 
8 Function's developer:
9 Copyright (c) 2019 Hang Wu
11 
12 ------
13 
14 This program is free software; you can redistribute it and/or modify
15 it under the terms of the GNU General Public License as published by
16 the Free Software Foundation; either version 2 of the License, or
17 (at your option) any later version.
18 
19 This program is distributed in the hope that it will be useful,
20 but WITHOUT ANY WARRANTY; without even the implied warranty of
21 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22 GNU General Public License for more details.
23 
24 You should have received a copy of the GNU General Public License
25 along with this program; if not, write to the Free Software
26 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
27 
28 ********************************************************************PGR-GNU*/
29 
30 #ifndef INCLUDE_TRANSITIVECLOSURE_PGR_TRANSITIVECLOSURE_HPP_
31 #define INCLUDE_TRANSITIVECLOSURE_PGR_TRANSITIVECLOSURE_HPP_
32 #pragma once
33 
34 #include <boost/graph/transitive_closure.hpp>
35 
36 #include <deque>
37 #include <vector>
38 #include <utility>
39 
40 #include "cpp_common/pgr_assert.h"
41 
42 
43 template < class G > class Pgr_transitiveClosure;
44 
45 
46 
47 template < class G >
49  public:
50  typedef typename G::V V;
51  boost::adjacency_list <boost::vecS, boost::vecS, boost::directedS, boost::no_property, boost::no_property,
52  boost::no_property, boost::listS> transitiveClosure(G &graph);
53 
54  private:
55  boost::adjacency_list <boost::vecS, boost::vecS, boost::directedS, boost::no_property, boost::no_property,
56  boost::no_property, boost::listS> generatetransitiveClosure(G &graph) {
57  boost::adjacency_list <boost::vecS, boost::vecS, boost::directedS, boost::no_property, boost::no_property,
58  boost::no_property, boost::listS> TC;
59  transitive_closure(graph.graph, TC);
60  return TC;
61  }
62 };
63 
64 template < class G >
65 boost::adjacency_list <boost::vecS, boost::vecS, boost::directedS, boost::no_property, boost::no_property,
66 boost::no_property, boost::listS>
68  G &graph) {
69  return generatetransitiveClosure(
70  graph);
71 }
72 
73 
74 
75 #endif // INCLUDE_TRANSITIVECLOSURE_PGR_TRANSITIVECLOSURE_HPP_
Pgr_transitiveClosure::V
G::V V
Definition: pgr_transitiveClosure.hpp:50
pgr_assert.h
An assert functionality that uses C++ throw().
Pgr_transitiveClosure::generatetransitiveClosure
boost::adjacency_list< boost::vecS, boost::vecS, boost::directedS, boost::no_property, boost::no_property, boost::no_property, boost::listS > generatetransitiveClosure(G &graph)
Definition: pgr_transitiveClosure.hpp:56
Pgr_transitiveClosure
Definition: pgr_transitiveClosure.hpp:43
pgrouting::alphashape::G
graph::Pgr_base_graph< BG, XY_vertex, Basic_edge > G
Definition: pgr_alphaShape.h:56
Pgr_transitiveClosure::transitiveClosure
boost::adjacency_list< boost::vecS, boost::vecS, boost::directedS, boost::no_property, boost::no_property, boost::no_property, boost::listS > transitiveClosure(G &graph)
Definition: pgr_transitiveClosure.hpp:67
pgrouting::alphashape::V
boost::graph_traits< BG >::vertex_descriptor V
Definition: pgr_alphaShape.h:58