PGROUTING
3.2
Main Page
Related Pages
Namespaces
Namespace List
Namespace Members
All
a
b
c
d
e
f
g
i
l
m
o
p
r
s
t
u
v
w
x
Functions
a
b
c
d
e
g
i
o
p
s
Typedefs
Enumerations
Enumerator
Classes
Class List
Class Index
Class Hierarchy
Class Members
All
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
~
Functions
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
r
s
t
u
v
w
x
y
~
Variables
a
b
c
d
e
f
g
i
l
m
n
o
p
q
r
s
t
u
v
w
x
y
Typedefs
b
c
d
e
g
i
l
o
p
s
v
Enumerations
Enumerator
Related Functions
c
d
e
i
o
p
s
Files
File List
File Members
All
_
a
b
c
d
e
f
g
i
l
m
o
p
r
s
t
u
v
Functions
_
a
c
d
e
f
g
i
o
p
r
s
t
Variables
Typedefs
Enumerations
Enumerator
Macros
•
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Pages
ch_edge.cpp
Go to the documentation of this file.
1
/*PGR-GNU*****************************************************************
2
File: ch_edge.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 "
cpp_common/ch_edge.h
"
31
32
namespace
pgrouting
{
33
34
void
35
CH_edge::cp_members
(
const
CH_edge
&other) {
36
this->
cost
= other.
cost
;
37
this->
id
= other.
id
;
38
this->
source
= other.
source
;
39
this->
target
= other.
target
;
40
this->
m_contracted_vertices
+= other.
contracted_vertices
();
41
}
42
43
44
bool
45
CH_edge::has_contracted_vertices
()
const
{
46
return
!
m_contracted_vertices
.
empty
();
47
}
48
49
const
Identifiers<int64_t>
&
50
CH_edge::contracted_vertices
()
const
{
51
return
m_contracted_vertices
;
52
}
53
54
Identifiers<int64_t>
&
55
CH_edge::contracted_vertices
() {
56
return
m_contracted_vertices
;
57
}
58
59
60
void
61
CH_edge::add_contracted_vertex
(
CH_vertex
& v) {
62
m_contracted_vertices
+= v.
id
;
63
m_contracted_vertices
+= v.
contracted_vertices
();
64
}
65
66
void
67
CH_edge::add_contracted_edge_vertices
(
CH_edge
&e) {
68
if
(e.
has_contracted_vertices
())
69
m_contracted_vertices
+= e.
contracted_vertices
();
70
}
71
72
std::ostream&
operator <<
(std::ostream& os,
const
CH_edge
& e) {
73
os <<
"{id: "
<< e.
id
<<
",\t"
74
<<
"source: "
<< e.
source
<<
",\t"
75
<<
"target: "
<< e.
target
<<
",\t"
76
<<
"cost: "
<< e.
cost
<<
",\t"
77
<<
"contracted vertices: "
78
<< e.
contracted_vertices
()
79
<<
"}"
;
80
return
os;
81
}
82
83
}
// namespace pgrouting
pgrouting::CH_edge::id
int64_t id
Definition:
ch_edge.h:62
ch_edge.h
pgrouting::CH_edge::cost
double cost
Definition:
ch_edge.h:65
pgrouting::CH_edge::has_contracted_vertices
bool has_contracted_vertices() const
Definition:
ch_edge.cpp:45
pgrouting::CH_vertex
Definition:
ch_vertex.h:40
pgrouting::CH_edge::add_contracted_vertex
void add_contracted_vertex(CH_vertex &v)
Definition:
ch_edge.cpp:61
pgrouting::operator<<
std::ostream & operator<<(std::ostream &log, const Basic_vertex &v)
Definition:
basic_vertex.cpp:37
Identifiers::empty
bool empty() const
Definition:
identifiers.hpp:79
pgrouting::CH_edge::add_contracted_edge_vertices
void add_contracted_edge_vertices(CH_edge &e)
Definition:
ch_edge.cpp:67
pgrouting::CH_edge::target
int64_t target
Definition:
ch_edge.h:64
pgrouting::CH_edge::cp_members
void cp_members(const CH_edge &other)
Definition:
ch_edge.cpp:35
pgrouting::CH_vertex::contracted_vertices
const Identifiers< int64_t > & contracted_vertices() const
Definition:
ch_vertex.cpp:39
pgrouting::CH_edge::contracted_vertices
const Identifiers< int64_t > & contracted_vertices() const
Definition:
ch_edge.cpp:50
pgrouting::CH_edge::source
int64_t source
Definition:
ch_edge.h:63
pgrouting::CH_vertex::id
int64_t id
Definition:
ch_vertex.h:42
pgrouting::CH_edge::m_contracted_vertices
Identifiers< int64_t > m_contracted_vertices
Definition:
ch_edge.h:68
pgrouting::CH_edge
Definition:
ch_edge.h:41
pgrouting
Book keeping class for swapping orders between vehicles.
Definition:
pgr_alphaShape.cpp:56
Identifiers< int64_t >
src
common
ch_edge.cpp
Generated on Tue May 25 2021 15:09:47 for PGROUTING by
1.8.17