PGROUTING  3.2
ch_edge.h
Go to the documentation of this file.
1 /*PGR-GNU*****************************************************************
2 File: ch_edge.h
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 #ifndef INCLUDE_CPP_COMMON_CH_EDGE_H_
31 #define INCLUDE_CPP_COMMON_CH_EDGE_H_
32 #pragma once
33 
34 #include <iostream>
35 #include <sstream>
36 #include "./ch_vertex.h"
37 // #include "./basic_edge.h"
38 
39 namespace pgrouting {
40 
41 class CH_edge {
42  public:
43  CH_edge() = default;
44 
45  CH_edge(int64_t eid, int64_t source, int64_t target, double cost) :
46  id(eid), source(source),
47  target(target), cost(cost) {}
48 
49  void cp_members(const CH_edge &other);
50 
53 
54  bool has_contracted_vertices() const;
55 
59  friend std::ostream& operator <<(std::ostream& os, const CH_edge& e);
60 
61  public:
62  int64_t id;
63  int64_t source;
64  int64_t target;
65  double cost;
66 
67  private:
69 };
70 
71 } // namespace pgrouting
72 
73 #endif // INCLUDE_CPP_COMMON_CH_EDGE_H_
pgrouting::CH_edge::id
int64_t id
Definition: ch_edge.h:62
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::clear_contracted_vertices
void clear_contracted_vertices()
Definition: ch_edge.h:56
pgrouting::CH_edge::add_contracted_vertex
void add_contracted_vertex(CH_vertex &v)
Definition: ch_edge.cpp:61
Identifiers::clear
void clear()
Definition: identifiers.hpp:84
pgrouting::CH_edge::add_contracted_edge_vertices
void add_contracted_edge_vertices(CH_edge &e)
Definition: ch_edge.cpp:67
pgrouting::CH_edge::CH_edge
CH_edge(int64_t eid, int64_t source, int64_t target, double cost)
Definition: ch_edge.h:45
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_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_edge::CH_edge
CH_edge()=default
pgrouting::CH_edge::m_contracted_vertices
Identifiers< int64_t > m_contracted_vertices
Definition: ch_edge.h:68
pgrouting::CH_edge::operator<<
friend std::ostream & operator<<(std::ostream &os, const CH_edge &e)
Definition: ch_edge.cpp:72
ch_vertex.h
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 >