5 #ifndef BPP_GRAPH_ASSOCIATIONDAGRAPHIMPLOBSERVER_H 6 #define BPP_GRAPH_ASSOCIATIONDAGRAPHIMPLOBSERVER_H 20 template<
class N,
class E,
class DAGraphImpl>
65 template<
class N2,
class E2>
110 return this->
getGraph()->isRooted();
119 std::vector<std::shared_ptr<N>>
getFathers(
const std::shared_ptr<N> node)
const 124 std::vector<NodeIndex>
getFathers(
const NodeIndex node)
const 134 void rootAt(
const std::shared_ptr<N> root)
142 bool hasFather(
const std::shared_ptr<N> nodeObject)
const 156 std::vector<std::shared_ptr<N>>
getSons(
const std::shared_ptr<N> node)
const 161 std::vector<NodeIndex>
getSons(
const NodeIndex node)
const 172 std::shared_ptr<N>
getSon(
const std::shared_ptr<E> edge)
const 177 NodeIndex
getSon(
const EdgeIndex edgeId)
const 233 std::vector<std::shared_ptr<N>>
removeFathers(
const std::shared_ptr<N> node)
242 void removeFather(
const std::shared_ptr<N> node,
const std::shared_ptr<N> father)
251 std::vector<std::shared_ptr<N>>
removeSons(
const std::shared_ptr<N> node)
259 void removeSon(
const std::shared_ptr<N> node,
const std::shared_ptr<N> son)
271 void addFather(
const std::shared_ptr<N> nodeObject,
const std::shared_ptr<N> fatherNodeObject,
const std::shared_ptr<E> edgeObject = 0)
280 this->
link(fatherNodeObject, nodeObject, edgeObject);
293 void addSon(
const std::shared_ptr<N> nodeObject,
const std::shared_ptr<N> sonNodeObject,
const std::shared_ptr<E> edgeObject = 0)
302 this->
link(nodeObject, sonNodeObject, edgeObject);
317 std::unique_ptr<typename AssociationDAGraphObserver<N, E>::NodeIterator>
fathersIterator(std::shared_ptr<N> node)
322 std::unique_ptr<typename AssociationDAGraphObserver<N, E>::NodeIterator>
fathersIterator(std::shared_ptr<N> node)
const 331 std::unique_ptr<typename AssociationDAGraphObserver<N, E>::NodeIterator>
sonsIterator(std::shared_ptr<N> node)
336 std::unique_ptr<typename AssociationDAGraphObserver<N, E>::NodeIterator>
sonsIterator(std::shared_ptr<N> node)
const 348 std::vector<std::shared_ptr<N>>
getBelowNodes(
const std::shared_ptr<N> localRoot)
353 std::vector<std::shared_ptr<E>>
getBelowEdges(
const std::shared_ptr<N> localRoot)
361 template<
class N,
class E>
366 #endif // BPP_GRAPH_ASSOCIATIONDAGRAPHIMPLOBSERVER_H
void link(Nref nodeObjectA, Nref nodeObjectB, Eref edgeObject=00)
bool hasFather(const std::shared_ptr< N > nodeObject) const
NodeGraphid getNodeGraphid(const Nref nodeObject) const
std::vector< std::shared_ptr< N > > removeSons(const std::shared_ptr< N > node)
std::vector< std::shared_ptr< N > > getSons(const std::shared_ptr< N > node) const
size_t getNumberOfSons(const std::shared_ptr< N > node) const
Graph::NodeId NodeGraphid
AssociationGraphObserver< N, E >::EdgeIndex EdgeIndex
std::unique_ptr< typename AssociationDAGraphObserver< N, E >::NodeIterator > sonsIterator(std::shared_ptr< N > node)
std::vector< Nref > getNodesFromGraphid(std::vector< NodeGraphid > nodes) const
void addSon(const std::shared_ptr< N > nodeObject, const std::shared_ptr< N > sonNodeObject, const std::shared_ptr< E > edgeObject=0)
Defines a DA Graph Associator. It is a template which follows (subscribed to) a Graph.
AssociationDAGraphImplObserver(bpp::AssociationDAGraphImplObserver< N2, E2, DAGraphImpl > const &dAGraphObserver)
std::unique_ptr< typename AssociationDAGraphObserver< N, E >::NodeIterator > fathersIterator(std::shared_ptr< N > node) const
std::unique_ptr< typename AssociationDAGraphObserver< N, E >::NodeIterator > sonsIterator(std::shared_ptr< N > node) const
AssociationDAGraphImplObserver< N, E, DAGraphImpl > * clone() const
size_t getNumberOfFathers(const std::shared_ptr< N > node) const
bool hasFather(const NodeIndex node) const
AssociationDAGraphImplObserver()
std::vector< std::shared_ptr< N > > getLeavesUnderNode(std::shared_ptr< N > node) const
EdgeGraphid getEdgeGraphid(const Eref edgeObject) const
const std::shared_ptr< DAGraphImpl > getGraph() const
std::vector< Eref > getEdgesFromGraphid(std::vector< EdgeGraphid > edges) const
AssociationGraphImplObserver< N, E, GraphImpl > & operator=(bpp::AssociationGraphImplObserver< N, E, GraphImpl > const &graphObserver)
std::shared_ptr< N > getSon(const std::shared_ptr< E > edge) const
std::vector< std::shared_ptr< E > > getBelowEdges(const std::shared_ptr< N > localRoot)
NodeIndex getNodeIndex(const Nref nodeObject) const
NodeIndex getSon(const EdgeIndex edgeId) const
void removeFather(const std::shared_ptr< N > node, const std::shared_ptr< N > father)
void addFather(const std::shared_ptr< N > nodeObject, const std::shared_ptr< N > fatherNodeObject, const std::shared_ptr< E > edgeObject=0)
std::vector< NodeIndex > getNodeIndexes(std::vector< Nref > nodes) const
~AssociationDAGraphImplObserver()
void removeSon(const std::shared_ptr< N > node, const std::shared_ptr< N > son)
NodeIndex getFatherOfEdge(const EdgeIndex edge) const
Graph::EdgeId EdgeGraphid
std::unique_ptr< typename AssociationDAGraphObserver< N, E >::NodeIterator > fathersIterator(std::shared_ptr< N > node)
Exception base class. Overload exception constructor (to control the exceptions mechanism). Destructor is already virtual (from std::exception)
std::vector< NodeIndex > getFathers(const NodeIndex node) const
Nref getNode(NodeIndex node) const
AssociationDAGraphImplObserver(std::shared_ptr< DAGraphImpl > subjectDAGraph)
AssociationGraphObserver< N, E >::NodeIndex NodeIndex
std::vector< std::shared_ptr< N > > getFathers(const std::shared_ptr< N > node) const
Eref getEdge(EdgeIndex edge) const
std::vector< std::shared_ptr< N > > removeFathers(const std::shared_ptr< N > node)
Nref getNodeFromGraphid(NodeGraphid node)
std::vector< NodeIndex > getSons(const NodeIndex node) const
std::unique_ptr< typename AssociationGraphObserver< N, E >::NodeIterator > outgoingNeighborNodesIterator(Nref node)
AssociationDAGraphImplObserver< N, E, DAGraphImpl > & operator=(bpp::AssociationDAGraphImplObserver< N, E, DAGraphImpl > const &dAGraphObserver)
std::unique_ptr< typename AssociationGraphObserver< N, E >::NodeIterator > incomingNeighborNodesIterator(Nref node)
void rootAt(const std::shared_ptr< N > root)
Sets the root and make the DAG directed from root to leaves.
AssociationDAGraphImplObserver(bpp::AssociationDAGraphImplObserver< N, E, DAGraphImpl > const &dAGraphObserver)
std::shared_ptr< N > getFatherOfEdge(const std::shared_ptr< E > edge) const
std::vector< std::shared_ptr< N > > getBelowNodes(const std::shared_ptr< N > localRoot)
Get Below Objects.