#include #include "node.h" #include "types.h" //static distance_t Node::INFINITE_DISTANCE = std::numeric_limits::max(); Node::Node() : distance_( INFINITE_DISTANCE ) , visited_( false ) , previous_( NULL ) { } void Node::AddNeighbour( Node& other, distance_t dist ) { neighbours_.push_back( NeighbourList::value_type( &other, dist ) ); } void Node::SetDistance( distance_t distance ) { distance_ = distance; } void Node::SetVisited( bool visited ) { visited_ = visited; } void Node::SetPrevious( const Node& previous ) { previous_ = &previous; } distance_t Node::GetDistance() const { return distance_; } bool Node::IsVisited() const { return visited_; } const Node* Node::GetPrevious() const { return previous_; } Node::NeighbourList& Node::Neighbours() { return neighbours_; }