diff --git a/src/instance/graph/Graph.h b/src/instance/graph/Graph.h index c1b329d76bfbad1cee9df9681c6b96136a02054b..9ad45fe3001ecb9709ddea97659d2438e87b10c7 100644 --- a/src/instance/graph/Graph.h +++ b/src/instance/graph/Graph.h @@ -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) */