diff --git a/src/ShortestPath/Transit/TransitAlgorithmState.h b/src/ShortestPath/Transit/TransitAlgorithmState.h index 48707ee68e84fdfdc5d3e0da3759c1bfdac142af..6a6bf0fa658495e741f89ab20b90ee26f1f7a199 100644 --- a/src/ShortestPath/Transit/TransitAlgorithmState.h +++ b/src/ShortestPath/Transit/TransitAlgorithmState.h @@ -139,6 +139,18 @@ public: && this->getConnections().size() > rhs.getConnections().size())); } + bool operator==(const TransitAlgorithmState& rhs) const { + return this->_nodeIndex == rhs.getNodeIndex() //same current node + && this->getInstant() == rhs.getInstant() + && this->getConnections().size() == rhs.getConnections().size(); + } + + bool operator!=(const TransitAlgorithmState& rhs) const { + return this->_nodeIndex != rhs.getNodeIndex() //same current node + || this->getInstant() != rhs.getInstant() + || this->getConnections().size() != rhs.getConnections().size(); + } + TransitAlgorithmState& operator=(const TransitAlgorithmState& baseState) { _nodeIndex = baseState.getNodeIndex(); _instant = baseState.getInstant();