Skip to content
Snippets Groups Projects
Commit 25426b5d authored by Romain BERNARD's avatar Romain BERNARD Committed by Romain BERNARD
Browse files

Add some access methods

parent 5992e047
No related branches found
No related tags found
1 merge request!1Transit algorithm implementation
......@@ -42,10 +42,18 @@ public:
return nodesVector.at(nodeIndex);
}
[[nodiscard]] size_t getNbNodes() const {
return nodesVector.size();
}
[[nodiscard]] std::vector<LineStop> getPTLinesSet(int nodeIndex) const {
return nodesVector.at(nodeIndex).getPTLinesSet();
}
[[nodiscard]] size_t getNbPTLines(int nodeIndex) const {
return nodesVector.at(nodeIndex).getPTLinesSet().size();
}
/**
* @return The graph's edge vector
*/
......@@ -53,6 +61,19 @@ public:
return edgesVector;
}
[[nodiscard]] size_t getNbIncomingEdges(int nodeIndex) const {
return nodesVector.at(nodeIndex).getIncomingEdges().size();
}
[[nodiscard]] size_t getNbOutgoingEdges(int nodeIndex) const {
return nodesVector.at(nodeIndex).getOutgoingEdges().size();
}
[[nodiscard]] size_t getNbEdges(int nodeIndex) const {
return nodesVector.at(nodeIndex).getIncomingEdges().size() + nodesVector.at(nodeIndex).getOutgoingEdges().size();
}
/**
* @return A vector containing the list of transit lines defined in our graph (effectively G^TP)
*/
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment