5 #ifndef BPP_GRAPH_GRAPH_H 6 #define BPP_GRAPH_GRAPH_H 42 virtual void setRoot(NodeId newRoot) = 0;
49 virtual NodeId
getRoot()
const = 0;
124 virtual EdgeId
link(NodeId nodeA, NodeId nodeB) = 0;
143 virtual std::vector<EdgeId>
unlink(NodeId nodeA, NodeId nodeB) = 0;
191 virtual void next() = 0;
192 virtual bool end()
const = 0;
193 virtual void start() = 0;
249 virtual size_t getDegree(NodeId node)
const = 0;
255 virtual bool isLeaf(NodeId node)
const = 0;
287 virtual std::vector<NodeId>
getNeighbors(
const NodeId node)
const = 0;
315 virtual std::vector<NodeId>
getLeavesFromNode(NodeId node,
unsigned int maxDepth)
const = 0;
339 virtual std::vector<NodeId>
getAllNodes()
const = 0;
348 virtual std::pair<NodeId, NodeId>
getNodes(EdgeId edge)
const = 0;
357 virtual NodeId
getTop(EdgeId edge)
const = 0;
366 virtual NodeId
getBottom(EdgeId edge)
const = 0;
380 virtual bool isTree()
const = 0;
387 virtual bool isDA()
const = 0;
430 virtual void next() = 0;
431 virtual bool end()
const = 0;
432 virtual void start() = 0;
465 virtual std::vector<EdgeId>
getEdges(
const NodeId node)
const = 0;
490 virtual std::vector<EdgeId>
getAllEdges()
const = 0;
499 virtual EdgeId
getEdge(NodeId nodeA, NodeId nodeB)
const = 0;
508 virtual EdgeId
getAnyEdge(NodeId nodeA, NodeId nodeB)
const = 0;
541 virtual void outputToDot(std::ostream& out,
const std::string& name)
const = 0;
543 template<
class N,
class E,
class GraphImpl>
547 #endif // BPP_GRAPH_GRAPH_H virtual std::vector< EdgeId > getOutgoingEdges(const NodeId node) const =0
virtual std::unique_ptr< EdgeIterator > outgoingEdgesIterator(NodeId node)=0
virtual NodeId operator*()=0
virtual std::unique_ptr< NodeIterator > incomingNeighborNodesIterator(NodeId node)=0
virtual std::vector< NodeId > getAllNodes() const =0
virtual std::unique_ptr< NodeIterator > allNodesIterator()=0
virtual size_t getNumberOfEdges() const =0
virtual void notifyDeletedEdges(const std::vector< EdgeId > &edgesToDelete) const =0
virtual bool isDA() const =0
define categories of iterators
virtual std::pair< NodeId, NodeId > getNodes(EdgeId edge) const =0
virtual void orientate()=0
virtual std::vector< EdgeId > getEdges(const NodeId node) const =0
virtual NodeId getTop(EdgeId edge) const =0
virtual std::unique_ptr< EdgeIterator > allEdgesIterator()=0
virtual size_t getDegree(NodeId node) const =0
virtual void setRoot(NodeId newRoot)=0
virtual std::vector< NodeId > getNeighbors(const NodeId node) const =0
virtual std::vector< NodeId > getOutgoingNeighbors(const NodeId node) const =0
virtual size_t getNumberOfOutgoingNeighbors(NodeId node) const =0
virtual std::vector< NodeId > getIncomingNeighbors(NodeId node) const =0
virtual bool containsReciprocalRelations() const =0
virtual size_t getNumberOfNodes() const =0
virtual NodeId getBottom(EdgeId edge) const =0
virtual std::unique_ptr< EdgeIterator > incomingEdgesIterator(NodeId node)=0
virtual bool end() const =0
virtual void unregisterObserver(GraphObserver *observer)=0
virtual std::unique_ptr< NodeIterator > outgoingNeighborNodesIterator(NodeId node)=0
virtual NodeId createNode()=0
virtual void makeDirected()=0
virtual EdgeId getEdge(NodeId nodeA, NodeId nodeB) const =0
virtual bool isDirected() const =0
virtual void makeUndirected()=0
virtual NodeId createNodeFromNode(NodeId origin)=0
virtual std::vector< EdgeId > getIncomingEdges(NodeId node) const =0
virtual bool isLeaf(NodeId node) const =0
virtual std::vector< EdgeId > getAllEdges() const =0
virtual std::vector< NodeId > getAllLeaves() const =0
virtual void notifyDeletedNodes(const std::vector< NodeId > &nodesToDelete) const =0
virtual EdgeId link(NodeId nodeA, NodeId nodeB)=0
virtual void outputToDot(std::ostream &out, const std::string &name) const =0
virtual void deleteNode(NodeId node)=0
virtual void registerObserver(GraphObserver *observer)=0
virtual bool isTree() const =0
virtual std::vector< NodeId > getAllInnerNodes() const =0
virtual std::vector< EdgeId > unlink(NodeId nodeA, NodeId nodeB)=0
virtual NodeId createNodeFromEdge(NodeId origin)=0
Defines a Graph Observer. It is a template which follows (subscribed to) a Graph. The graph and the g...
virtual NodeId getRoot() const =0
virtual std::vector< NodeId > getLeavesFromNode(NodeId node, unsigned int maxDepth) const =0
virtual NodeId createNodeOnEdge(NodeId edge)=0
virtual size_t getNumberOfNeighbors(NodeId node) const =0
virtual EdgeId getAnyEdge(NodeId nodeA, NodeId nodeB) const =0
virtual size_t getNumberOfIncomingNeighbors(const NodeId node) const =0
virtual std::set< NodeId > getSetOfAllLeaves() const =0