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
dnode.cpp
Go to the documentation of this file.
1
/*PGR-GNU*****************************************************************
2
3
FILE: dnode.cpp
4
5
Copyright (c) 2015 pgRouting developers
6
Mail: project@pgrouting.org
7
8
------
9
10
This program is free software; you can redistribute it and/or modify
11
it under the terms of the GNU General Public License as published by
12
the Free Software Foundation; either version 2 of the License, or
13
(at your option) any later version.
14
15
This program is distributed in the hope that it will be useful,
16
but WITHOUT ANY WARRANTY; without even the implied warranty of
17
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18
GNU General Public License for more details.
19
20
You should have received a copy of the GNU General Public License
21
along with this program; if not, write to the Free Software
22
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
23
24
********************************************************************PGR-GNU*/
25
26
#include "
vrp/dnode.h
"
27
28
#include "
vrp/pgr_pickDeliver.h
"
29
30
namespace
pgrouting
{
31
namespace
vrp {
32
33
Pgr_pickDeliver*
Dnode::problem
;
34
35
std::ostream&
operator <<
(std::ostream &log,
const
Dnode
&node) {
36
log << node.
id
()
37
<<
"("
<< node.
idx
() <<
")"
;
38
return
log;
39
}
40
41
42
double
43
Dnode::distance
(
const
Dnode
&other)
const
{
44
return
problem
->
get_cost_matrix
().
distance
(
45
problem
->
get_cost_matrix
().
get_index
(
id
()),
46
problem
->
get_cost_matrix
().
get_index
(other.
id
()));
47
}
48
49
50
Dnode::Dnode
(
size_t
idx, int64_t
id
) :
51
Identifier
(idx, id) {
52
}
53
54
55
}
// namespace vrp
56
}
// namespace pgrouting
57
58
pgrouting::vrp::Dnode
The Dnode class defines a the basic operations when data is a matrix.
Definition:
dnode.h:48
pgr_pickDeliver.h
dnode.h
pgrouting::tsp::Dmatrix::get_index
size_t get_index(int64_t id) const
original id -> idx
Definition:
Dmatrix.cpp:93
pgrouting::vrp::Dnode::distance
double distance(const Dnode &other) const
Definition:
dnode.cpp:43
pgrouting::vrp::Dnode::problem
static Pgr_pickDeliver * problem
The problem.
Definition:
dnode.h:70
pgrouting::vrp::operator<<
std::ostream & operator<<(std::ostream &log, const Swap_info &d)
Definition:
book_keeping.cpp:47
pgrouting::Identifier::idx
size_t idx() const
Definition:
identifier.cpp:37
pgrouting::vrp::Pgr_pickDeliver::get_cost_matrix
pgrouting::tsp::Dmatrix get_cost_matrix() const
Definition:
pgr_pickDeliver.h:92
pgrouting::Identifier::id
int64_t id() const
Definition:
identifier.cpp:42
pgrouting::Identifier
Definition:
identifier.h:39
pgrouting::tsp::Dmatrix::distance
double distance(int64_t i, int64_t j) const
Definition:
Dmatrix.h:108
pgrouting::vrp::Dnode::Dnode
Dnode()=default
pgrouting
Book keeping class for swapping orders between vehicles.
Definition:
pgr_alphaShape.cpp:56
src
pickDeliver
dnode.cpp
Generated on Tue May 25 2021 15:09:47 for PGROUTING by
1.8.17