// Copyright 2016, University of Freiburg, // Chair of Algorithms and Data Structures. // Authors: Patrick Brosi #ifndef UTIL_GRAPH_DIRNODE_H_ #define UTIL_GRAPH_DIRNODE_H_ #include #include "util/graph/Node.h" namespace util { namespace graph { // forward declaration of Edge template class DirNode : public Node { public: DirNode(); DirNode(const N& pl); ~DirNode(); const std::vector*>& getAdjList() const; const std::vector*>& getAdjListIn() const; const std::vector*>& getAdjListOut() const; size_t getDeg() const; size_t getInDeg() const; size_t getOutDeg() const; bool hasEdgeIn(const Edge* e) const; bool hasEdgeOut(const Edge* e) const; bool hasEdge(const Edge* e) const; // add edge to this node's adjacency lists void addEdge(Edge* e); // remove edge from this node's adjacency lists void removeEdge(Edge* e); N& pl(); const N& pl() const; private: std::vector*> _adjListIn; std::vector*> _adjListOut; N _pl; bool adjInContains(const Edge* e) const; bool adjOutContains(const Edge* e) const; }; #include "util/graph/DirNode.tpp" }} #endif // UTIL_GRAPH_DIRNODE_H_