PGROUTING  2.4
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
ch_vertex.cpp
Go to the documentation of this file.
1 /*PGR-GNU*****************************************************************
2 File: ch_vertex.cpp
3 
4 Generated with Template by:
5 Copyright (c) 2015 pgRouting developers
6 Mail: project@pgrouting.org
7 
8 Function's developer:
9 Copyright (c) 2016 Rohith Reddy
10 Mail:
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 #include "./ch_vertex.h"
31 
32 #include <algorithm>
33 #include <vector>
34 
35 namespace pgrouting {
36 
37 
40  return m_contracted_vertices;
41 }
42 
43 
45  if (m_contracted_vertices.size() == 0)
46  return false;
47  return true;
48 }
49 
51  m_contracted_vertices += vid;
54 }
55 
56 std::ostream& operator <<(std::ostream& os, const CH_vertex& v) {
57  os << "{id: " << v.id << ",\t"
58  << "contracted vertices: "
59  << v.contracted_vertices()
60  << "}";
61  return os;
62 }
63 
64 } // namespace pgrouting
Identifiers< int64_t > m_contracted_vertices
Definition: ch_vertex.h:58
std::ostream & operator<<(std::ostream &log, const Basic_vertex &v)
void clear_contracted_vertices()
Definition: ch_vertex.h:55
bool has_contracted_vertices() const
Definition: ch_vertex.cpp:44
size_t size() const
Definition: identifiers.hpp:56
void add_contracted_vertex(CH_vertex &v, int64_t vid)
Definition: ch_vertex.cpp:50
const Identifiers< int64_t > & contracted_vertices() const
Definition: ch_vertex.cpp:39