PGROUTING  2.4
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
pgrouting::vrp::Node Class Reference

The Node class defines a point in 2D space with an id. More...

#include "node.h"

Inheritance diagram for pgrouting::vrp::Node:
pgrouting::vrp::Tw_node pgrouting::vrp::Vehicle_node

Public Member Functions

 Node (size_t id, int64_t original_id, double _x, double _y)
 
accessors
size_t id () const
 @ { More...
 
int64_t original_id () const
 

state

pgrouting::Point m_point
 
size_t m_id
 internal node number More...
 
int64_t m_original_id
 
bool isSamePos (const Node &other) const
 @ { More...
 
bool operator== (const Node &rhs) const
 
double distance (const Node &other) const
 
double comparable_distance (const Node &other) const
 
std::ostream & operator<< (std::ostream &log, const Node &node)
 

Detailed Description

The Node class defines a point in 2D space with an id.

A Node is a point that defines a location in 2D space. It maintains a user id and an internal nid along with its x, y location. This is the base object that things like depots, customer locations, etc. are built upon.

Definition at line 46 of file node.h.

Constructor & Destructor Documentation

pgrouting::vrp::Node::Node ( size_t  id,
int64_t  original_id,
double  _x,
double  _y 
)

Definition at line 63 of file node.cpp.

Member Function Documentation

double pgrouting::vrp::Node::comparable_distance ( const Node other) const

Definition at line 56 of file node.cpp.

References m_point.

Referenced by isSamePos().

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

Definition at line 49 of file node.cpp.

References m_point.

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

bool pgrouting::vrp::Node::isSamePos ( const Node other) const

@ {

Definition at line 31 of file node.cpp.

References comparable_distance().

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

Definition at line 70 of file node.cpp.

References id(), m_point, and original_id().

int64_t pgrouting::vrp::Node::original_id ( ) const
inline

Definition at line 52 of file node.h.

References m_original_id.

Referenced by operator==().

Friends And Related Function Documentation

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

Definition at line 41 of file node.cpp.

Member Data Documentation

size_t pgrouting::vrp::Node::m_id
private

internal node number

Definition at line 75 of file node.h.

Referenced by id(), and pgrouting::vrp::operator<<().

int64_t pgrouting::vrp::Node::m_original_id
private

Definition at line 76 of file node.h.

Referenced by pgrouting::vrp::operator<<(), and original_id().

pgrouting::Point pgrouting::vrp::Node::m_point
private

Definition at line 74 of file node.h.

Referenced by comparable_distance(), distance(), pgrouting::vrp::operator<<(), and operator==().


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