All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
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 Base_node *) const
int64_t id () const
size_t idx () const
void reset_id (int64_t)
 Dnode ()=default
 Dnode (size_t id, int64_t original_id, double, double)
 data constructor More...
to be or not to be
virtual bool operator== (const Base_node &rhs) const

Static Public Attributes

static Pgr_messages msg

Static Protected Attributes

static Pgr_pickDeliverproblem


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 45 of file dnode.h.

Constructor & Destructor Documentation

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

data constructor

Definition at line 49 of file dnode.cpp.

50  : Base_node(id, original_id) {
51  }

Member Function Documentation

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

Implements pgrouting::vrp::Base_node.

Definition at line 42 of file dnode.cpp.

References pgrouting::tsp::Dmatrix::distance(), pgrouting::tsp::Dmatrix::get_index(), pgrouting::Identifier::id(), pgrouting::vrp::Pgr_pickDeliver::m_cost_matrix, and pgrouting::vrp::PD_problem::problem.

42  {
45  problem->m_cost_matrix.get_index(other->id()));
46 }
static Pgr_pickDeliver * problem
Definition: pd_problem.h:51
double distance(int64_t i, int64_t j) const
Definition: Dmatrix.h:106
pgrouting::tsp::Dmatrix m_cost_matrix
size_t get_index(int64_t id) const
original id -> idx
Definition: Dmatrix.cpp:90

Here is the call graph for this function:

bool pgrouting::vrp::Base_node::operator== ( const Base_node rhs) const

Definition at line 48 of file base_node.cpp.

References pgrouting::Identifier::id(), and pgrouting::Identifier::idx().

48  {
49  if (&rhs == this) return true;
50  return
51  (idx() == rhs.idx())
52  && (id() ==;
53 }
size_t idx() const
Definition: identifier.cpp:37

Here is the call graph for this function:

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

Definition at line 47 of file identifier.cpp.

References pgrouting::Identifier::m_id.

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

47  {
48  m_id = _id;
49 }

Here is the caller graph for this function:

Friends And Related Function Documentation

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

Definition at line 34 of file dnode.cpp.

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

Member Data Documentation

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