bpp-core3  3.0.0
bpp::DAGraph Class Referenceabstract

#include <Bpp/Graph/DAGraph.h>

+ Inheritance diagram for bpp::DAGraph:
+ Collaboration diagram for bpp::DAGraph:

Public Types

typedef unsigned int NodeId
 
typedef unsigned int EdgeId
 

Public Member Functions

virtual bool isValid () const =0
 
virtual bool isRooted () const =0
 
virtual bool hasFather (Graph::NodeId node) const =0
 
virtual std::vector< Graph::NodeIdgetFathers (Graph::NodeId node) const =0
 
virtual size_t getNumberOfFathers (Graph::NodeId node) const =0
 Get the number of fathers nodes. More...
 
virtual void addFather (Graph::NodeId node, Graph::NodeId father)=0
 
virtual void addFather (Graph::NodeId node, Graph::NodeId father, Graph::EdgeId edgeId)=0
 
virtual void removeFather (Graph::NodeId node, Graph::NodeId father)=0
 
virtual std::vector< Graph::NodeIdremoveFathers (Graph::NodeId node)=0
 
virtual std::vector< Graph::NodeIdgetLeavesUnderNode (Graph::NodeId node) const =0
 
virtual std::vector< Graph::NodeIdgetSons (Graph::NodeId node) const =0
 
virtual size_t getNumberOfSons (Graph::NodeId node) const =0
 Get the number of sons node. More...
 
void addSon (Graph::NodeId node, Graph::NodeId sonNode)
 
void addSon (Graph::NodeId node, Graph::NodeId sonNode, Graph::EdgeId edge)
 
virtual std::vector< Graph::NodeIdremoveSons (Graph::NodeId node)=0
 
virtual void removeSon (Graph::NodeId node, Graph::NodeId son)=0
 
virtual void rootAt (Graph::NodeId newRoot)=0
 
virtual std::vector< Graph::NodeIdgetBelowNodes (Graph::NodeId localRoot) const =0
 
virtual std::vector< Graph::EdgeIdgetBelowEdges (Graph::NodeId localRoot) const =0
 
virtual NodeId getRoot () const =0
 
virtual void makeDirected ()=0
 
virtual void makeUndirected ()=0
 
Observers Management

Managing communication with the observers: subscribe, unsubscribe.

virtual void registerObserver (GraphObserver *observer)=0
 
virtual void unregisterObserver (GraphObserver *observer)=0
 
Iterator interface on Nodes
virtual std::unique_ptr< NodeIteratorallNodesIterator ()=0
 
virtual std::unique_ptr< NodeIteratorallNodesIterator () const =0
 
virtual std::unique_ptr< NodeIteratoroutgoingNeighborNodesIterator (NodeId node)=0
 
virtual std::unique_ptr< NodeIteratorincomingNeighborNodesIterator (NodeId node)=0
 
virtual size_t getNumberOfNodes () const =0
 
virtual size_t getNumberOfEdges () const =0
 
virtual size_t getDegree (NodeId node) const =0
 
virtual bool isLeaf (NodeId node) const =0
 
virtual size_t getNumberOfNeighbors (NodeId node) const =0
 
virtual size_t getNumberOfOutgoingNeighbors (NodeId node) const =0
 
virtual size_t getNumberOfIncomingNeighbors (const NodeId node) const =0
 
virtual std::vector< NodeIdgetNeighbors (const NodeId node) const =0
 
virtual std::vector< NodeIdgetOutgoingNeighbors (const NodeId node) const =0
 
virtual std::vector< NodeIdgetIncomingNeighbors (NodeId node) const =0
 
virtual std::vector< NodeIdgetLeavesFromNode (NodeId node, unsigned int maxDepth) const =0
 
virtual std::vector< NodeIdgetAllLeaves () const =0
 
virtual std::set< NodeIdgetSetOfAllLeaves () const =0
 
virtual std::vector< NodeIdgetAllInnerNodes () const =0
 
virtual std::vector< NodeIdgetAllNodes () const =0
 
virtual std::pair< NodeId, NodeIdgetNodes (EdgeId edge) const =0
 
virtual NodeId getTop (EdgeId edge) const =0
 
virtual NodeId getBottom (EdgeId edge) const =0
 
virtual std::unique_ptr< EdgeIteratorallEdgesIterator ()=0
 
virtual std::unique_ptr< EdgeIteratoroutgoingEdgesIterator (NodeId node)=0
 
virtual std::unique_ptr< EdgeIteratorincomingEdgesIterator (NodeId node)=0
 
virtual std::vector< EdgeIdgetEdges (const NodeId node) const =0
 
virtual std::vector< EdgeIdgetOutgoingEdges (const NodeId node) const =0
 
virtual std::vector< EdgeIdgetIncomingEdges (NodeId node) const =0
 
virtual std::vector< EdgeIdgetAllEdges () const =0
 
virtual EdgeId getEdge (NodeId nodeA, NodeId nodeB) const =0
 
virtual EdgeId getAnyEdge (NodeId nodeA, NodeId nodeB) const =0
 
Topological Properties

These methodes check some topological properties.

virtual bool isTree () const =0
 
virtual bool isDA () const =0
 
virtual void orientate ()=0
 
virtual bool isDirected () const =0
 
virtual bool containsReciprocalRelations () const =0
 

Protected Member Functions

virtual void setRoot (NodeId newRoot)=0
 

Relations management

Modificating the structure of the graph.

virtual NodeId createNode ()=0
 
virtual NodeId createNodeFromNode (NodeId origin)=0
 
virtual NodeId createNodeOnEdge (NodeId edge)=0
 
virtual NodeId createNodeFromEdge (NodeId origin)=0
 
virtual void deleteNode (NodeId node)=0
 
virtual EdgeId link (NodeId nodeA, NodeId nodeB)=0
 
virtual void link (Graph::NodeId nodeA, Graph::NodeId nodeB, Graph::EdgeId edgeID)=0
 
virtual std::vector< EdgeIdunlink (NodeId nodeA, NodeId nodeB)=0
 

Updating the changes on the observers

These methodes aim to trigger some changes to the observers

virtual void outputToDot (std::ostream &out, const std::string &name) const =0
 
virtual void notifyDeletedEdges (const std::vector< EdgeId > &edgesToDelete) const =0
 
virtual void notifyDeletedNodes (const std::vector< NodeId > &nodesToDelete) const =0
 

Detailed Description

Definition at line 20 of file DAGraph.h.

Member Typedef Documentation

◆ EdgeId

typedef unsigned int bpp::Graph::EdgeId
inherited

Definition at line 31 of file Graph.h.

◆ NodeId

typedef unsigned int bpp::Graph::NodeId
inherited

Definition at line 30 of file Graph.h.

Member Function Documentation

◆ addFather() [1/2]

virtual void bpp::DAGraph::addFather ( Graph::NodeId  node,
Graph::NodeId  father 
)
pure virtual

Add a father to a node

Implemented in bpp::DAGraphImpl< GraphImpl >.

◆ addFather() [2/2]

virtual void bpp::DAGraph::addFather ( Graph::NodeId  node,
Graph::NodeId  father,
Graph::EdgeId  edgeId 
)
pure virtual

◆ addSon() [1/2]

void bpp::DAGraph::addSon ( Graph::NodeId  node,
Graph::NodeId  sonNode 
)

Add a son to a node

◆ addSon() [2/2]

void bpp::DAGraph::addSon ( Graph::NodeId  node,
Graph::NodeId  sonNode,
Graph::EdgeId  edge 
)

◆ allEdgesIterator()

virtual std::unique_ptr<EdgeIterator> bpp::Graph::allEdgesIterator ( )
pure virtualinherited

◆ allNodesIterator() [1/2]

virtual std::unique_ptr<NodeIterator> bpp::Graph::allNodesIterator ( )
pure virtualinherited

◆ allNodesIterator() [2/2]

virtual std::unique_ptr<NodeIterator> bpp::Graph::allNodesIterator ( ) const
pure virtualinherited

Implemented in bpp::GlobalGraph.

◆ containsReciprocalRelations()

virtual bool bpp::Graph::containsReciprocalRelations ( ) const
pure virtualinherited

Does the graph contain reciprocal relations such as A->B and B->A?

Returns
true if one of them is seen in the structure

Implemented in bpp::GlobalGraph.

◆ createNode()

virtual NodeId bpp::Graph::createNode ( )
pure virtualinherited

Creates an orphaned node.

Returns
the index of the new node

Implemented in bpp::GlobalGraph.

Referenced by bpp::Graph::~Graph().

◆ createNodeFromEdge()

virtual NodeId bpp::Graph::createNodeFromEdge ( NodeId  origin)
pure virtualinherited

Creates a node linked to new node.

Parameters
originexisting edge. In a directed graph: origin -> newNode.
Returns
the index of the new node

Implemented in bpp::GlobalGraph.

Referenced by bpp::Graph::~Graph().

◆ createNodeFromNode()

virtual NodeId bpp::Graph::createNodeFromNode ( NodeId  origin)
pure virtualinherited

Creates a node linked to an existing node.

Parameters
originexisting node. In a directed graph: origin -> newNode.
Returns
the index of the new node

Implemented in bpp::GlobalGraph.

Referenced by bpp::Graph::~Graph().

◆ createNodeOnEdge()

virtual NodeId bpp::Graph::createNodeOnEdge ( NodeId  edge)
pure virtualinherited

Creates new node on an existing Edge, splitting an edge0. A -> B will be A -> N -> B

Parameters
edgeexisting edge.
Returns
the index of the new node

Implemented in bpp::GlobalGraph.

Referenced by bpp::Graph::~Graph().

◆ deleteNode()

virtual void bpp::Graph::deleteNode ( NodeId  node)
pure virtualinherited

Delete one node

Parameters
nodenode to be deleted

Implemented in bpp::GlobalGraph.

Referenced by bpp::TreeGraphImpl< GraphImpl >::setOutGroup(), and bpp::Graph::~Graph().

◆ getAllEdges()

virtual std::vector<EdgeId> bpp::Graph::getAllEdges ( ) const
pure virtualinherited

Get all edges of a graph.

Returns
a vector containing the edges

Implemented in bpp::GlobalGraph.

Referenced by bpp::Graph::EdgeIterator::~EdgeIterator().

◆ getAllInnerNodes()

virtual std::vector<NodeId> bpp::Graph::getAllInnerNodes ( ) const
pure virtualinherited

Get all the inner nodes, ie, nodes with degree > 1.

Returns
a vector containing the nodes

Implemented in bpp::GlobalGraph.

◆ getAllLeaves()

virtual std::vector<NodeId> bpp::Graph::getAllLeaves ( ) const
pure virtualinherited

Get all leaves of a graph, ie, nodes with no son (or only one neighbor is not directet).

Returns
a vector containing the leaves

Implemented in bpp::GlobalGraph.

◆ getAllNodes()

virtual std::vector<NodeId> bpp::Graph::getAllNodes ( ) const
pure virtualinherited

Get all the nodes.

Returns
a vector containing the nodes

Implemented in bpp::GlobalGraph.

◆ getAnyEdge()

virtual EdgeId bpp::Graph::getAnyEdge ( NodeId  nodeA,
NodeId  nodeB 
) const
pure virtualinherited

Returns the Edge between two nodes, trying both directions

Parameters
nodeAany node implied in the relation
nodeBany other node implied in the relation
Returns
the edge between these two nodes

Implemented in bpp::GlobalGraph.

Referenced by bpp::Graph::EdgeIterator::~EdgeIterator().

◆ getBelowEdges()

virtual std::vector<Graph::EdgeId> bpp::DAGraph::getBelowEdges ( Graph::NodeId  localRoot) const
pure virtual

Get all the branches below a node

Implemented in bpp::DAGraphImpl< GraphImpl >.

◆ getBelowNodes()

virtual std::vector<Graph::NodeId> bpp::DAGraph::getBelowNodes ( Graph::NodeId  localRoot) const
pure virtual

Get all the nodes below a node

Implemented in bpp::DAGraphImpl< GraphImpl >.

◆ getBottom()

virtual NodeId bpp::Graph::getBottom ( EdgeId  edge) const
pure virtualinherited

Get node located at the bottom of an edge

Returns
the Node at the bottom the edge example : N1–E1–>N2; getBottom(E1) will return N2;

Implemented in bpp::GlobalGraph.

◆ getDegree()

virtual size_t bpp::Graph::getDegree ( NodeId  node) const
pure virtualinherited

Get the degree of a node (ie the number of neighbors) in the graph.

Parameters
nodethe node one wants to count its neighbors
Returns
the number of neighbors

Implemented in bpp::GlobalGraph.

◆ getEdge()

virtual EdgeId bpp::Graph::getEdge ( NodeId  nodeA,
NodeId  nodeB 
) const
pure virtualinherited

Returns the Edge between two nodes

Parameters
nodeAif directed, origin node
nodeBif directed, destination node
Returns
the edge between these two nodes

Implemented in bpp::GlobalGraph.

Referenced by bpp::TreeGraphImpl< GraphImpl >::setOutGroup(), and bpp::Graph::EdgeIterator::~EdgeIterator().

◆ getEdges()

virtual std::vector<EdgeId> bpp::Graph::getEdges ( const NodeId  node) const
pure virtualinherited

Get all the edges to/from a node in the graph.

Parameters
nodethe node one wants to get its edges
Returns
a vector containing the ID of the edges

Implemented in bpp::GlobalGraph.

Referenced by bpp::Graph::EdgeIterator::~EdgeIterator().

◆ getFathers()

virtual std::vector<Graph::NodeId> bpp::DAGraph::getFathers ( Graph::NodeId  node) const
pure virtual

Get the fathers node of a node

Implemented in bpp::DAGraphImpl< GraphImpl >.

◆ getIncomingEdges()

virtual std::vector<EdgeId> bpp::Graph::getIncomingEdges ( NodeId  node) const
pure virtualinherited

In an directed graph, get all the edges which are coming to a node in the graph.

Parameters
nodethe node one wants to get its edges
Returns
a vector containing the incoming edges

Implemented in bpp::GlobalGraph.

Referenced by bpp::Graph::EdgeIterator::~EdgeIterator().

◆ getIncomingNeighbors()

virtual std::vector<NodeId> bpp::Graph::getIncomingNeighbors ( NodeId  node) const
pure virtualinherited

In an directed graph, get all the neighbors which are coming to a node in the graph.

Parameters
nodethe node one wants to get its neighbors
Returns
a vector containing the incoming neighbors

Implemented in bpp::GlobalGraph.

Referenced by bpp::TreeGraphImpl< GraphImpl >::getFatherOfNode(), and bpp::DAGraphImpl< GraphImpl >::getFathers().

◆ getLeavesFromNode()

virtual std::vector<NodeId> bpp::Graph::getLeavesFromNode ( NodeId  node,
unsigned int  maxDepth 
) const
pure virtualinherited

Get the leaves of a graph, ie, nodes with only one neighbor, starting from a peculiar node.

Parameters
nodethe starting node
maxDepththe maximum number of allowed depth.
Returns
a vector containing the leaves

Implemented in bpp::GlobalGraph.

◆ getLeavesUnderNode()

virtual std::vector<Graph::NodeId> bpp::DAGraph::getLeavesUnderNode ( Graph::NodeId  node) const
pure virtual

Get the leaves under a node

Parameters
nodethe starting node
Returns
a vector containing the leaves

Implemented in bpp::DAGraphImpl< GraphImpl >.

◆ getNeighbors()

virtual std::vector<NodeId> bpp::Graph::getNeighbors ( const NodeId  node) const
pure virtualinherited

Get all the neighbors of a node in the graph.

Parameters
nodethe node one wants to get its neighbors
Returns
a vector containing the ID of the neighbors

Implemented in bpp::GlobalGraph.

◆ getNodes()

virtual std::pair<NodeId, NodeId> bpp::Graph::getNodes ( EdgeId  edge) const
pure virtualinherited

Get nodes located at the extremities of an edge

Returns
a pair of the Nodes at each extremity of the edge example : N1–E1–>N2; getNodes(E1) will return (N1,N2);

Implemented in bpp::GlobalGraph.

◆ getNumberOfEdges()

virtual size_t bpp::Graph::getNumberOfEdges ( ) const
pure virtualinherited

Get the number of edges in the graph.

Implemented in bpp::GlobalGraph.

◆ getNumberOfFathers()

virtual size_t bpp::DAGraph::getNumberOfFathers ( Graph::NodeId  node) const
pure virtual

Get the number of fathers nodes.

Implemented in bpp::DAGraphImpl< GraphImpl >.

◆ getNumberOfIncomingNeighbors()

virtual size_t bpp::Graph::getNumberOfIncomingNeighbors ( const NodeId  node) const
pure virtualinherited

Get the number of incoming neighbors of a node (ie the number of fathers) in the graph.

Parameters
nodethe node one wants to count its fathers
Returns
the number of incoming neighbors

Implemented in bpp::GlobalGraph.

Referenced by bpp::DAGraphImpl< GraphImpl >::removeFather().

◆ getNumberOfNeighbors()

virtual size_t bpp::Graph::getNumberOfNeighbors ( NodeId  node) const
pure virtualinherited

Get the number of neighbors of a node in the graph.

Parameters
nodethe node one wants to count its sons
Returns
the number of neighbors

Implemented in bpp::GlobalGraph.

◆ getNumberOfNodes()

virtual size_t bpp::Graph::getNumberOfNodes ( ) const
pure virtualinherited

Get the number of nodes in the graph.

Implemented in bpp::GlobalGraph.

◆ getNumberOfOutgoingNeighbors()

virtual size_t bpp::Graph::getNumberOfOutgoingNeighbors ( NodeId  node) const
pure virtualinherited

Get the number of outgoing neighbors of a node (ie the number of sons) in the graph.

Parameters
nodethe node one wants to count its sons
Returns
the number of outgoing neighbors

Implemented in bpp::GlobalGraph.

◆ getNumberOfSons()

virtual size_t bpp::DAGraph::getNumberOfSons ( Graph::NodeId  node) const
pure virtual

Get the number of sons node.

Implemented in bpp::DAGraphImpl< GraphImpl >.

◆ getOutgoingEdges()

virtual std::vector<EdgeId> bpp::Graph::getOutgoingEdges ( const NodeId  node) const
pure virtualinherited

In an directed graph, get all the edges which are leaving a node in the graph.

Parameters
nodethe node one wants to get its edges
Returns
a vector containing the ID of the outgoing edges

Implemented in bpp::GlobalGraph.

Referenced by bpp::Graph::EdgeIterator::~EdgeIterator().

◆ getOutgoingNeighbors()

virtual std::vector<NodeId> bpp::Graph::getOutgoingNeighbors ( const NodeId  node) const
pure virtualinherited

In an directed graph, get all the neighbors which are leaving a node in the graph.

Parameters
nodethe node one wants to get its neighbors
Returns
a vector containing the ID of the outgoing neighbors

Implemented in bpp::GlobalGraph.

◆ getRoot()

virtual NodeId bpp::Graph::getRoot ( ) const
pure virtualinherited

get the root node

Implemented in bpp::GlobalGraph.

Referenced by bpp::TreeGraphImpl< GraphImpl >::MRCA(), and bpp::Graph::~Graph().

◆ getSetOfAllLeaves()

virtual std::set<NodeId> bpp::Graph::getSetOfAllLeaves ( ) const
pure virtualinherited

Implemented in bpp::GlobalGraph.

◆ getSons()

virtual std::vector<Graph::NodeId> bpp::DAGraph::getSons ( Graph::NodeId  node) const
pure virtual

Get the sons node of a node

Implemented in bpp::DAGraphImpl< GraphImpl >.

◆ getTop()

virtual NodeId bpp::Graph::getTop ( EdgeId  edge) const
pure virtualinherited

Get node located at the top of an edge

Returns
the Node at the top the edge example : N1–E1–>N2; getTop(E1) will return N1;

Implemented in bpp::GlobalGraph.

◆ hasFather()

virtual bool bpp::DAGraph::hasFather ( Graph::NodeId  node) const
pure virtual

Check if node has a father

Implemented in bpp::DAGraphImpl< GraphImpl >.

◆ incomingEdgesIterator()

virtual std::unique_ptr<EdgeIterator> bpp::Graph::incomingEdgesIterator ( NodeId  node)
pure virtualinherited

◆ incomingNeighborNodesIterator()

virtual std::unique_ptr<NodeIterator> bpp::Graph::incomingNeighborNodesIterator ( NodeId  node)
pure virtualinherited

Implemented in bpp::GlobalGraph.

◆ isDA()

virtual bool bpp::Graph::isDA ( ) const
pure virtualinherited

Is the graph directed acyclic?

Returns
true if an edge is met more than one time browsing the graph

Implemented in bpp::GlobalGraph.

◆ isDirected()

virtual bool bpp::Graph::isDirected ( ) const
pure virtualinherited

Is the graph directed?

Returns
true the type of the graph is directed

Implemented in bpp::GlobalGraph.

◆ isLeaf()

virtual bool bpp::Graph::isLeaf ( NodeId  node) const
pure virtualinherited

Says if a node is a leaf (ie has at most one neighbor).

Implemented in bpp::GlobalGraph, bpp::TreeGraphImpl< GraphImpl >, bpp::DAGraphImpl< GraphImpl >, and bpp::TreeGraph.

◆ isRooted()

virtual bool bpp::DAGraph::isRooted ( ) const
pure virtual

Is the DAG rooted?

Returns
true if rooted, ie has only one node with no father.

Implemented in bpp::DAGraphImpl< GraphImpl >.

◆ isTree()

virtual bool bpp::Graph::isTree ( ) const
pure virtualinherited

Is the graph a tree?

Returns
false if a node is met more than one time browsing the graph

Implemented in bpp::GlobalGraph.

◆ isValid()

virtual bool bpp::DAGraph::isValid ( ) const
pure virtual

Is the graph a directed acyclic?

Returns
true if valid DAG

Implemented in bpp::DAGraphImpl< GraphImpl >.

◆ link() [1/2]

virtual EdgeId bpp::Graph::link ( NodeId  nodeA,
NodeId  nodeB 
)
protectedpure virtualinherited

Creates a link between two existing nodes. If directed graph: nodeA -> nodeB.

Parameters
nodeAsource node (or first node if undirected)
nodeBtarget node (or second node if undirected)
Returns
the index of the new edge

Implemented in bpp::GlobalGraph.

Referenced by bpp::Graph::~Graph().

◆ link() [2/2]

virtual void bpp::Graph::link ( Graph::NodeId  nodeA,
Graph::NodeId  nodeB,
Graph::EdgeId  edgeID 
)
protectedpure virtualinherited

Sets a link between two existing nodes, using existing edge. If directed graph: nodeA -> nodeB.

Parameters
nodeAsource node (or first node if undirected)
nodeBtarget node (or second node if undirected)
edgeIDthe used edge

Implemented in bpp::GlobalGraph.

◆ makeDirected()

virtual void bpp::Graph::makeDirected ( )
pure virtualinherited

Make the graph directed

  • changes the property
  • de-duplicate the relations: eg: A - B in undirected is represented as A->B and B->A in directed, becomes A->B only

Please note that the resulting directions are totaly arbritrary. One might consider to use the makeLocalRoot method.

Implemented in bpp::GlobalGraph.

Referenced by bpp::Graph::~Graph().

◆ makeUndirected()

virtual void bpp::Graph::makeUndirected ( )
pure virtualinherited

Make the graph directed

  • changes the property
  • de-duplicate the relations: eg: A - B in directed is represented as A->B in undirected, becomes A->B and B->A If the directed graph already contains reciprocal relations, such as A->B and B->A, the method will throw an exception.

Implemented in bpp::GlobalGraph.

Referenced by bpp::Graph::~Graph().

◆ notifyDeletedEdges()

virtual void bpp::Graph::notifyDeletedEdges ( const std::vector< EdgeId > &  edgesToDelete) const
protectedpure virtualinherited

Trigger E objects deleting on the observers

Parameters
edgesToDeletelist of edges to delete

Implemented in bpp::GlobalGraph.

Referenced by bpp::Graph::EdgeIterator::~EdgeIterator().

◆ notifyDeletedNodes()

virtual void bpp::Graph::notifyDeletedNodes ( const std::vector< NodeId > &  nodesToDelete) const
protectedpure virtualinherited

Trigger N objects deleting on the observers

Parameters
nodesToDeletelist of edges to delete

Implemented in bpp::GlobalGraph.

Referenced by bpp::Graph::EdgeIterator::~EdgeIterator().

◆ orientate()

virtual void bpp::Graph::orientate ( )
pure virtualinherited

Orientates the graph hanging from the root

Implemented in bpp::GlobalGraph.

◆ outgoingEdgesIterator()

virtual std::unique_ptr<EdgeIterator> bpp::Graph::outgoingEdgesIterator ( NodeId  node)
pure virtualinherited

◆ outgoingNeighborNodesIterator()

virtual std::unique_ptr<NodeIterator> bpp::Graph::outgoingNeighborNodesIterator ( NodeId  node)
pure virtualinherited

Implemented in bpp::GlobalGraph.

◆ outputToDot()

virtual void bpp::Graph::outputToDot ( std::ostream &  out,
const std::string &  name 
) const
pure virtualinherited

Output the graph in DOT format

Parameters
outa ostream where the DOT format will be output
namea string naming the graph

Implemented in bpp::GlobalGraph.

Referenced by bpp::Graph::EdgeIterator::~EdgeIterator().

◆ registerObserver()

virtual void bpp::Graph::registerObserver ( GraphObserver observer)
pure virtualinherited

Attach a new observer to this Graph. As a subscriber, the observer will be warned of all the changes.

Implemented in bpp::GlobalGraph.

Referenced by bpp::Graph::~Graph().

◆ removeFather()

virtual void bpp::DAGraph::removeFather ( Graph::NodeId  node,
Graph::NodeId  father 
)
pure virtual

Remove one father

Implemented in bpp::DAGraphImpl< GraphImpl >.

◆ removeFathers()

virtual std::vector<Graph::NodeId> bpp::DAGraph::removeFathers ( Graph::NodeId  node)
pure virtual

Remove all the fathers

Implemented in bpp::DAGraphImpl< GraphImpl >.

◆ removeSon()

virtual void bpp::DAGraph::removeSon ( Graph::NodeId  node,
Graph::NodeId  son 
)
pure virtual

Remove one son

Implemented in bpp::DAGraphImpl< GraphImpl >.

◆ removeSons()

virtual std::vector<Graph::NodeId> bpp::DAGraph::removeSons ( Graph::NodeId  node)
pure virtual

Remove all the sons

Implemented in bpp::DAGraphImpl< GraphImpl >.

◆ rootAt()

virtual void bpp::DAGraph::rootAt ( Graph::NodeId  newRoot)
pure virtual

Re-root the DA with the new root

Implemented in bpp::DAGraphImpl< GraphImpl >.

◆ setRoot()

virtual void bpp::Graph::setRoot ( NodeId  newRoot)
protectedpure virtualinherited

set the root node to an existing node. Will not affect the topology.

Parameters
newRootthe new root

Implemented in bpp::GlobalGraph.

Referenced by bpp::Graph::~Graph().

◆ unlink()

virtual std::vector<EdgeId> bpp::Graph::unlink ( NodeId  nodeA,
NodeId  nodeB 
)
protectedpure virtualinherited

Remove all links between two existing nodes. If directed graph: nodeA -> nodeB.

Parameters
nodeAsource node (or first node if undirected)
nodeBtarget node (or second node if undirected)
Returns
vector of IDs to de-assigned edges

Implemented in bpp::GlobalGraph.

Referenced by bpp::Graph::~Graph().

◆ unregisterObserver()

virtual void bpp::Graph::unregisterObserver ( GraphObserver observer)
pure virtualinherited

Detach an observer from this Graph. The observer will not be warned of changes anymore.

Implemented in bpp::GlobalGraph.

Referenced by bpp::Graph::~Graph().


The documentation for this class was generated from the following file: