PGROUTING  3.2
edges_order_dfs_visitor.hpp
Go to the documentation of this file.
1 /*PGR-GNU*****************************************************************
2 File: edges_order_dfs_visitor.hpp
3 
4 Copyright (c) 2015 pgRouting developers
6 
7 Copyright (c) 2018 Aditya Pratap Singh
9 
10 ------
11 
12 This program is free software; you can redistribute it and/or modify
13 it under the terms of the GNU General Public License as published by
14 the Free Software Foundation; either version 2 of the License, or
15 (at your option) any later version.
16 
17 This program is distributed in the hope that it will be useful,
18 but WITHOUT ANY WARRANTY; without even the implied warranty of
19 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20 GNU General Public License for more details.
21 
22 You should have received a copy of the GNU General Public License
23 along with this program; if not, write to the Free Software
24 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
25 
26  ********************************************************************PGR-GNU*/
29 #ifndef INCLUDE_VISITORS_EDGES_ORDER_DFS_VISITOR_HPP_
30 #define INCLUDE_VISITORS_EDGES_ORDER_DFS_VISITOR_HPP_
31 #pragma once
32 
33 #include <boost/graph/depth_first_search.hpp>
34 #include <vector>
35 #include "visitors/found_goals.hpp"
36 
37 namespace pgrouting {
38 namespace visitors {
39 
40 /* DFS */
41 template <class E>
42 class Edges_order_dfs_visitor : public boost::default_dfs_visitor {
43  public:
45  std::vector<E> &data) :
46  m_data(data) {}
47  template <typename B_G>
48  void tree_edge(E e, const B_G&) {
49  m_data.push_back(e);
50  }
51  private:
52  std::vector<E> &m_data;
53 };
54 
55 
56 } // namespace visitors
57 } // namespace pgrouting
58 
59 #endif // INCLUDE_VISITORS_EDGES_ORDER_DFS_VISITOR_HPP_
found_goals.hpp
pgrouting::visitors::Edges_order_dfs_visitor::tree_edge
void tree_edge(E e, const B_G &)
Definition: edges_order_dfs_visitor.hpp:48
pgrouting::alphashape::E
boost::graph_traits< BG >::edge_descriptor E
Definition: pgr_alphaShape.h:57
pgrouting
Book keeping class for swapping orders between vehicles.
Definition: pgr_alphaShape.cpp:56
pgrouting::visitors::Edges_order_dfs_visitor
Definition: edges_order_dfs_visitor.hpp:42
pgrouting::visitors::Edges_order_dfs_visitor::Edges_order_dfs_visitor
Edges_order_dfs_visitor(std::vector< E > &data)
Definition: edges_order_dfs_visitor.hpp:44
pgrouting::visitors::Edges_order_dfs_visitor::m_data
std::vector< E > & m_data
Definition: edges_order_dfs_visitor.hpp:52