PGROUTING  2.6
pgrouting::CH_vertex Class Reference

#include "ch_vertex.h"

Collaboration diagram for pgrouting::CH_vertex:

Public Member Functions

 CH_vertex ()=default
 
 CH_vertex (const CH_vertex &)=default
 
 CH_vertex (const pgr_edge_t &other, bool is_source)
 
void add_contracted_vertex (CH_vertex &v, int64_t vid)
 
void add_vertex_id (int64_t vid)
 
void clear_contracted_vertices ()
 
const Identifiers< int64_t > & contracted_vertices () const
 
void cp_members (const CH_vertex &other)
 
bool has_contracted_vertices () const
 

Public Attributes

int64_t id
 

Private Attributes

Identifiers< int64_t > m_contracted_vertices
 

Friends

std::ostream & operator<< (std::ostream &os, const CH_vertex &v)
 

Detailed Description

Definition at line 40 of file ch_vertex.h.

Constructor & Destructor Documentation

pgrouting::CH_vertex::CH_vertex ( )
default
pgrouting::CH_vertex::CH_vertex ( const CH_vertex )
default
pgrouting::CH_vertex::CH_vertex ( const pgr_edge_t other,
bool  is_source 
)
inline

Definition at line 45 of file ch_vertex.h.

45  :
46  id(is_source? other.source : other.target)
47  {}
int64_t source
Definition: pgr_edge_t.h:60
int64_t target
Definition: pgr_edge_t.h:61

Member Function Documentation

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

Definition at line 50 of file ch_vertex.cpp.

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

Referenced by cp_members().

50  {
51  m_contracted_vertices += vid;
52  m_contracted_vertices += v.contracted_vertices();
53  v.clear_contracted_vertices();
54 }
Identifiers< int64_t > m_contracted_vertices
Definition: ch_vertex.h:58

Here is the call graph for this function:

Here is the caller graph for this function:

void pgrouting::CH_vertex::add_vertex_id ( int64_t  vid)
inline

Definition at line 52 of file ch_vertex.h.

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

52 {m_contracted_vertices += vid;}
Identifiers< int64_t > m_contracted_vertices
Definition: ch_vertex.h:58

Here is the call graph for this function:

void pgrouting::CH_vertex::clear_contracted_vertices ( )
inline

Definition at line 55 of file ch_vertex.h.

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

Referenced by pgrouting::CH_edge::add_contracted_vertex(), and add_contracted_vertex().

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

Here is the call graph for this function:

Here is the caller graph for this function:

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

Definition at line 39 of file ch_vertex.cpp.

References m_contracted_vertices.

Referenced by pgrouting::CH_edge::add_contracted_vertex(), add_contracted_vertex(), add_vertex_id(), and pgrouting::operator<<().

39  {
40  return m_contracted_vertices;
41 }
Identifiers< int64_t > m_contracted_vertices
Definition: ch_vertex.h:58

Here is the caller graph for this function:

void pgrouting::CH_vertex::cp_members ( const CH_vertex other)
inline

Definition at line 48 of file ch_vertex.h.

References add_contracted_vertex(), and id.

48  {
49  this->id = other.id;
50  }

Here is the call graph for this function:

bool pgrouting::CH_vertex::has_contracted_vertices ( ) const

Definition at line 44 of file ch_vertex.cpp.

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

Referenced by add_vertex_id().

44  {
45  if (m_contracted_vertices.size() == 0)
46  return false;
47  return true;
48 }
Identifiers< int64_t > m_contracted_vertices
Definition: ch_vertex.h:58
size_t size() const
Definition: identifiers.hpp:77

Here is the call graph for this function:

Here is the caller graph for this function:

Friends And Related Function Documentation

std::ostream& operator<< ( std::ostream &  os,
const CH_vertex v 
)
friend

Definition at line 56 of file ch_vertex.cpp.

Referenced by clear_contracted_vertices().

56  {
57  os << "{id: " << v.id << ",\t"
58  << "contracted vertices: "
59  << v.contracted_vertices()
60  << "}";
61  return os;
62 }

Member Data Documentation

int64_t pgrouting::CH_vertex::id

Definition at line 42 of file ch_vertex.h.

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

Identifiers<int64_t> pgrouting::CH_vertex::m_contracted_vertices
private

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