PGROUTING  3.2
pgrouting::vrp::Dnode Class Reference

The Dnode class defines a the basic operations when data is a matrix. More...

#include "dnode.h"

Inheritance diagram for pgrouting::vrp::Dnode:
Collaboration diagram for pgrouting::vrp::Dnode:

Public Member Functions

double distance (const Dnode &other) const
 
int64_t id () const
 
size_t idx () const
 
void reset_id (int64_t)
 
constructors
 Dnode ()=default
 
 Dnode (size_t id, int64_t original_id)
 data constructor More...
 

Static Protected Member Functions

static Pgr_messagesmsg ()
 

Static Protected Attributes

static Pgr_pickDeliverproblem
 The problem. More...
 

Private Attributes

int64_t m_id
 
size_t m_idx
 
friend PD_problem
 

Friends

std::ostream & operator<< (std::ostream &log, const Dnode &node)
 

Detailed Description

The Dnode class defines a the basic operations when data is a matrix.

currently needs the PD_problem

Definition at line 48 of file dnode.h.

Constructor & Destructor Documentation

◆ Dnode() [1/2]

pgrouting::vrp::Dnode::Dnode ( )
default

◆ Dnode() [2/2]

pgrouting::vrp::Dnode::Dnode ( size_t  id,
int64_t  original_id 
)

data constructor

Definition at line 50 of file dnode.cpp.

50  :
51  Identifier(idx, id) {
52  }

Member Function Documentation

◆ distance()

double pgrouting::vrp::Dnode::distance ( const Dnode other) const

◆ id()

◆ idx()

◆ msg()

static Pgr_messages& pgrouting::vrp::Dnode::msg ( )
staticprotected

◆ reset_id()

void pgrouting::Identifier::reset_id ( int64_t  _id)
inherited

Definition at line 47 of file identifier.cpp.

47  {
48  m_id = _id;
49 }

References pgrouting::Identifier::m_id.

Referenced by pgrouting::vrp::Tw_node::Tw_node().

Friends And Related Function Documentation

◆ operator<<

std::ostream& operator<< ( std::ostream &  log,
const Dnode node 
)
friend

Definition at line 35 of file dnode.cpp.

35  {
36  log << node.id()
37  << "(" << node.idx() << ")";
38  return log;
39 }

Member Data Documentation

◆ m_id

int64_t pgrouting::Identifier::m_id
privateinherited

Definition at line 53 of file identifier.h.

Referenced by pgrouting::Identifier::id(), and pgrouting::Identifier::reset_id().

◆ m_idx

size_t pgrouting::Identifier::m_idx
privateinherited

Definition at line 52 of file identifier.h.

Referenced by pgrouting::Identifier::idx().

◆ PD_problem

friend pgrouting::vrp::Dnode::PD_problem
private

Definition at line 49 of file dnode.h.

◆ problem

Pgr_pickDeliver * pgrouting::vrp::Dnode::problem
staticprotected

The problem.

Definition at line 70 of file dnode.h.

Referenced by distance(), and pgrouting::vrp::PD_problem::PD_problem().


The documentation for this class was generated from the following files:
pgrouting::tsp::Dmatrix::get_index
size_t get_index(int64_t id) const
original id -> idx
Definition: Dmatrix.cpp:93
pgrouting::vrp::Dnode::problem
static Pgr_pickDeliver * problem
The problem.
Definition: dnode.h:70
pgrouting::Identifier::idx
size_t idx() const
Definition: identifier.cpp:37
pgrouting::vrp::Pgr_pickDeliver::get_cost_matrix
pgrouting::tsp::Dmatrix get_cost_matrix() const
Definition: pgr_pickDeliver.h:92
pgrouting::Identifier::m_idx
size_t m_idx
Definition: identifier.h:52
pgrouting::Identifier::m_id
int64_t m_id
Definition: identifier.h:53
pgrouting::tsp::Dmatrix::distance
double distance(int64_t i, int64_t j) const
Definition: Dmatrix.h:108
pgrouting::Identifier::Identifier
Identifier()=default