PGROUTING  3.2
pgrouting::vrp::Swap_bk Class Reference

#include "book_keeping.h"

Collaboration diagram for pgrouting::vrp::Swap_bk:

Classes

class  Compare
 

Public Types

typedef std::priority_queue< Swap_info, std::vector< Swap_info >, CompareSwaps_queue
 

Public Member Functions

 Swap_bk ()=default
 
 Swap_bk (const Swap_bk &bk)=default
 
bool empty ()
 
void pop ()
 
Swaps_queuepossible_swaps ()
 
void push (const Swap_info &data)
 
Swap_info top ()
 

Public Attributes

Swaps_queue m_swaps
 

Friends

std::ostream & operator<< (std::ostream &log, const Swap_bk &data)
 

Detailed Description

Definition at line 83 of file book_keeping.h.

Member Typedef Documentation

◆ Swaps_queue

typedef std::priority_queue< Swap_info, std::vector<Swap_info>, Compare > pgrouting::vrp::Swap_bk::Swaps_queue

Definition at line 96 of file book_keeping.h.

Constructor & Destructor Documentation

◆ Swap_bk() [1/2]

pgrouting::vrp::Swap_bk::Swap_bk ( )
default

◆ Swap_bk() [2/2]

pgrouting::vrp::Swap_bk::Swap_bk ( const Swap_bk bk)
default

Member Function Documentation

◆ empty()

bool pgrouting::vrp::Swap_bk::empty ( )
inline

Definition at line 109 of file book_keeping.h.

109 {return m_swaps.empty();}

References m_swaps.

◆ pop()

void pgrouting::vrp::Swap_bk::pop ( )
inline

Definition at line 108 of file book_keeping.h.

108 {return m_swaps.pop();}

References m_swaps.

◆ possible_swaps()

Swaps_queue& pgrouting::vrp::Swap_bk::possible_swaps ( )
inline

Definition at line 105 of file book_keeping.h.

105 {return m_swaps;}

References m_swaps.

◆ push()

void pgrouting::vrp::Swap_bk::push ( const Swap_info data)
inline

Definition at line 106 of file book_keeping.h.

106 {m_swaps.push(data);}

References m_swaps.

◆ top()

Swap_info pgrouting::vrp::Swap_bk::top ( )
inline

Definition at line 107 of file book_keeping.h.

107 {return m_swaps.top();}

References m_swaps.

Friends And Related Function Documentation

◆ operator<<

std::ostream& operator<< ( std::ostream &  log,
const Swap_bk data 
)
friend

Definition at line 63 of file book_keeping.cpp.

63  {
64  auto q = data.m_swaps;
65  while (!q.empty()) {
66  log << q.top() << " ";
67  q.pop();
68  }
69  log << '\n';
70  return log;
71 }

Member Data Documentation

◆ m_swaps

Swaps_queue pgrouting::vrp::Swap_bk::m_swaps

Definition at line 99 of file book_keeping.h.

Referenced by empty(), pgrouting::vrp::operator<<(), pop(), possible_swaps(), push(), and top().


The documentation for this class was generated from the following file:
pgrouting::vrp::Swap_bk::m_swaps
Swaps_queue m_swaps
Definition: book_keeping.h:99