PGROUTING  2.5
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 91 of file book_keeping.h.

Member Typedef Documentation

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

Definition at line 104 of file book_keeping.h.

Constructor & Destructor Documentation

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

Member Function Documentation

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

Definition at line 128 of file book_keeping.h.

Referenced by pgrouting::vrp::Optimize::inter_swap(), and pgrouting::vrp::Optimize::swap_order().

128 {return m_swaps.empty();}

Here is the caller graph for this function:

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

Definition at line 127 of file book_keeping.h.

Referenced by pgrouting::vrp::Optimize::swap_order().

127 {return m_swaps.pop();}

Here is the caller graph for this function:

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

Definition at line 124 of file book_keeping.h.

124 {return m_swaps;}
void pgrouting::vrp::Swap_bk::push ( const Swap_info data)
inline

Definition at line 125 of file book_keeping.h.

Referenced by pgrouting::vrp::Optimize::swap_worse().

125 {m_swaps.push(data);}

Here is the caller graph for this function:

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

Definition at line 126 of file book_keeping.h.

Referenced by pgrouting::vrp::Optimize::swap_order().

126 {return m_swaps.top();}

Here is the caller graph for this function:

Friends And Related Function Documentation

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

Swaps_queue pgrouting::vrp::Swap_bk::m_swaps

Definition at line 107 of file book_keeping.h.

Referenced by pgrouting::vrp::operator<<().


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