PGROUTING  3.2
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
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 "cpp_common/ch_vertex.h"
31 
32 #include <algorithm>
33 #include <vector>
34 
35 namespace pgrouting {
36 
37 
40  return m_contracted_vertices;
41 }
42 
45  return m_contracted_vertices;
46 }
47 
48 
50  if (m_contracted_vertices.size() == 0)
51  return false;
52  return true;
53 }
54 
58 }
59 
60 std::ostream& operator <<(std::ostream& os, const CH_vertex& v) {
61  os << "{id: " << v.id << ",\t"
62  << "contracted vertices: "
63  << v.contracted_vertices()
64  << "}";
65  return os;
66 }
67 
68 } // namespace pgrouting
pgrouting::CH_vertex::has_contracted_vertices
bool has_contracted_vertices() const
Definition: ch_vertex.cpp:49
pgrouting::CH_vertex
Definition: ch_vertex.h:40
Identifiers::size
size_t size() const
Definition: identifiers.hpp:78
pgrouting::operator<<
std::ostream & operator<<(std::ostream &log, const Basic_vertex &v)
Definition: basic_vertex.cpp:37
pgrouting::CH_vertex::add_contracted_vertex
void add_contracted_vertex(CH_vertex &v)
Definition: ch_vertex.cpp:55
pgrouting::CH_vertex::contracted_vertices
const Identifiers< int64_t > & contracted_vertices() const
Definition: ch_vertex.cpp:39
pgrouting::CH_vertex::id
int64_t id
Definition: ch_vertex.h:42
ch_vertex.h
pgrouting
Book keeping class for swapping orders between vehicles.
Definition: pgr_alphaShape.cpp:56
Identifiers< int64_t >
pgrouting::CH_vertex::m_contracted_vertices
Identifiers< int64_t > m_contracted_vertices
Definition: ch_vertex.h:59