PGROUTING  2.5
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
pgrouting::CH_edge Class Reference

#include "ch_edge.h"

Collaboration diagram for pgrouting::CH_edge:

Public Member Functions

 CH_edge ()=default
 
 CH_edge (int64_t eid, int64_t source, int64_t target, double cost)
 
void add_contracted_edge_vertices (CH_edge &e)
 
void add_contracted_vertex (CH_vertex &v, int64_t vid)
 
void clear_contracted_vertices ()
 
const Identifiers< int64_t > & contracted_vertices () const
 
void cp_members (const CH_edge &other)
 
bool has_contracted_vertices () const
 

Public Attributes

double cost
 
int64_t id
 
int64_t source
 
int64_t target
 

Private Attributes

Identifiers< int64_t > m_contracted_vertices
 

Friends

std::ostream & operator<< (std::ostream &os, const CH_edge &e)
 

Detailed Description

Definition at line 41 of file ch_edge.h.

Constructor & Destructor Documentation

pgrouting::CH_edge::CH_edge ( )
default
pgrouting::CH_edge::CH_edge ( int64_t  eid,
int64_t  source,
int64_t  target,
double  cost 
)
inline

Definition at line 45 of file ch_edge.h.

45  :
46  id(eid), source(source),
47  target(target), cost(cost) {}
int64_t target
Definition: ch_edge.h:63
int64_t source
Definition: ch_edge.h:62

Member Function Documentation

void pgrouting::CH_edge::add_contracted_edge_vertices ( CH_edge e)

Definition at line 61 of file ch_edge.cpp.

References clear_contracted_vertices(), contracted_vertices(), and m_contracted_vertices.

Referenced by pgrouting::contraction::Pgr_linear< G >::add_shortcut().

61  {
62  m_contracted_vertices += e.contracted_vertices();
63  e.clear_contracted_vertices();
64 }
Identifiers< int64_t > m_contracted_vertices
Definition: ch_edge.h:67

Here is the call graph for this function:

Here is the caller graph for this function:

void pgrouting::CH_edge::add_contracted_vertex ( CH_vertex v,
int64_t  vid 
)

Definition at line 54 of file ch_edge.cpp.

References pgrouting::CH_vertex::clear_contracted_vertices(), pgrouting::CH_vertex::contracted_vertices(), and m_contracted_vertices.

Referenced by pgrouting::contraction::Pgr_linear< G >::add_shortcut(), and do_pgr_test_c_edges().

54  {
55  m_contracted_vertices += vid;
56  m_contracted_vertices += v.contracted_vertices();
57  v.clear_contracted_vertices();
58 }
Identifiers< int64_t > m_contracted_vertices
Definition: ch_edge.h:67

Here is the call graph for this function:

Here is the caller graph for this function:

void pgrouting::CH_edge::clear_contracted_vertices ( )
inline

Definition at line 56 of file ch_edge.h.

References Identifiers< T >::clear(), and m_contracted_vertices.

Referenced by add_contracted_edge_vertices().

void clear()
Definition: identifiers.hpp:83
Identifiers< int64_t > m_contracted_vertices
Definition: ch_edge.h:67

Here is the call graph for this function:

Here is the caller graph for this function:

const Identifiers< int64_t > & pgrouting::CH_edge::contracted_vertices ( ) const

Definition at line 48 of file ch_edge.cpp.

References m_contracted_vertices.

Referenced by add_contracted_edge_vertices(), cp_members(), and pgrouting::operator<<().

48  {
49  return m_contracted_vertices;
50 }
Identifiers< int64_t > m_contracted_vertices
Definition: ch_edge.h:67

Here is the caller graph for this function:

void pgrouting::CH_edge::cp_members ( const CH_edge other)

Definition at line 35 of file ch_edge.cpp.

References contracted_vertices(), cost, id, and m_contracted_vertices.

35  {
36  this->cost = other.cost;
37  this->id = other.id;
38  this->m_contracted_vertices += other.contracted_vertices();
39 }
Identifiers< int64_t > m_contracted_vertices
Definition: ch_edge.h:67

Here is the call graph for this function:

bool pgrouting::CH_edge::has_contracted_vertices ( ) const

Definition at line 43 of file ch_edge.cpp.

References Identifiers< T >::empty(), and m_contracted_vertices.

43  {
44  return !m_contracted_vertices.empty();
45 }
Identifiers< int64_t > m_contracted_vertices
Definition: ch_edge.h:67
bool empty() const
Definition: identifiers.hpp:78

Here is the call graph for this function:

Friends And Related Function Documentation

std::ostream& operator<< ( std::ostream &  os,
const CH_edge e 
)
friend

Definition at line 66 of file ch_edge.cpp.

66  {
67  os << "{id: " << e.id << ",\t"
68  << "source: " << e.source << ",\t"
69  << "target: " << e.target << ",\t"
70  << "cost: " << e.cost << ",\t"
71  << "contracted vertices: "
72  << e.contracted_vertices()
73  << "}";
74  return os;
75 }

Member Data Documentation

double pgrouting::CH_edge::cost

Definition at line 64 of file ch_edge.h.

Referenced by cp_members(), do_pgr_test_c_edges(), and pgrouting::operator<<().

int64_t pgrouting::CH_edge::id

Definition at line 61 of file ch_edge.h.

Referenced by cp_members(), do_pgr_test_c_edges(), and pgrouting::operator<<().

Identifiers<int64_t> pgrouting::CH_edge::m_contracted_vertices
private
int64_t pgrouting::CH_edge::source

Definition at line 62 of file ch_edge.h.

Referenced by do_pgr_test_c_edges(), and pgrouting::operator<<().

int64_t pgrouting::CH_edge::target

Definition at line 63 of file ch_edge.h.

Referenced by do_pgr_test_c_edges(), and pgrouting::operator<<().


The documentation for this class was generated from the following files: