5 #ifndef BPP_GRAPH_ASSOCIATIONDAGRAPHOBSERVER_H 6 #define BPP_GRAPH_ASSOCIATIONDAGRAPHOBSERVER_H 26 template<
class N,
class E>
43 virtual bool isValid()
const = 0;
58 virtual void rootAt(
const std::shared_ptr<N> root) = 0;
67 virtual std::vector<std::shared_ptr<N>>
getFathers(
const std::shared_ptr<N> node)
const = 0;
69 virtual std::vector<NodeIndex>
getFathers(
const NodeIndex node)
const = 0;
75 virtual bool hasFather(
const std::shared_ptr<N> nodeObject)
const = 0;
76 virtual bool hasFather(
const NodeIndex node)
const = 0;
84 virtual std::vector<std::shared_ptr<N>>
getSons(
const std::shared_ptr<N> node)
const = 0;
86 virtual std::vector<NodeIndex>
getSons(
const NodeIndex node)
const = 0;
94 virtual std::shared_ptr<N>
getSon(
const std::shared_ptr<E> edge)
const = 0;
95 virtual NodeIndex
getSon(
const EdgeIndex edge)
const = 0;
103 virtual std::shared_ptr<N>
getFatherOfEdge(
const std::shared_ptr<E> edge)
const = 0;
112 virtual size_t getNumberOfSons(
const std::shared_ptr<N> node)
const = 0;
129 virtual std::vector<std::shared_ptr<N>>
getLeavesUnderNode(std::shared_ptr<N> node)
const = 0;
136 virtual std::vector<std::shared_ptr<N>>
removeSons(
const std::shared_ptr<N> node) = 0;
144 virtual void removeSon(
const std::shared_ptr<N> node,
const std::shared_ptr<N> son) = 0;
154 virtual void addSon(
const std::shared_ptr<N> nodeObject,
const std::shared_ptr<N> sonNodeObject,
const std::shared_ptr<E> edgeObject = 0) = 0;
161 virtual std::vector<std::shared_ptr<N>>
removeFathers(
const std::shared_ptr<N> node) = 0;
167 virtual void removeFather(
const std::shared_ptr<N> node,
const std::shared_ptr<N> father) = 0;
177 virtual void addFather(
const std::shared_ptr<N> nodeObject,
const std::shared_ptr<N> fatherNodeObject,
const std::shared_ptr<E> edgeObject = 0) = 0;
198 virtual std::unique_ptr<NodeIterator>
sonsIterator(std::shared_ptr<N> node) = 0;
200 virtual std::unique_ptr<NodeIterator>
sonsIterator(std::shared_ptr<N> node)
const = 0;
207 virtual std::unique_ptr<NodeIterator>
fathersIterator(std::shared_ptr<N> node) = 0;
209 virtual std::unique_ptr<NodeIterator>
fathersIterator(std::shared_ptr<N> node)
const = 0;
219 virtual std::vector<std::shared_ptr<N>>
getBelowNodes(
const std::shared_ptr<N> localRoot) = 0;
221 virtual std::vector<std::shared_ptr<E>>
getBelowEdges(
const std::shared_ptr<N> localRoot) = 0;
224 #endif // BPP_GRAPH_ASSOCIATIONDAGRAPHOBSERVER_H
virtual void addFather(const std::shared_ptr< N > nodeObject, const std::shared_ptr< N > fatherNodeObject, const std::shared_ptr< E > edgeObject=0)=0
virtual std::vector< std::shared_ptr< N > > getSons(const std::shared_ptr< N > node) const =0
virtual void rootAt(const std::shared_ptr< N > root)=0
Sets the root and make the DAG directed from root to leaves.
Defines a Graph Associator. It is a template which follows (subscribed to) a Graph.
DAGraph::EdgeId EdgeGraphid
AssociationGraphObserver< N, E >::NodeIterator NodeIterator
Defines a DA Graph Associator. It is a template which follows (subscribed to) a Graph.
virtual std::unique_ptr< NodeIterator > fathersIterator(std::shared_ptr< N > node)=0
virtual std::vector< std::shared_ptr< N > > getLeavesUnderNode(std::shared_ptr< N > node) const =0
virtual std::vector< std::shared_ptr< N > > removeSons(const std::shared_ptr< N > node)=0
AssociationDAGraphObserver< N, E >::EdgeIndex EdgeIndex
virtual std::vector< std::shared_ptr< E > > getBelowEdges(const std::shared_ptr< N > localRoot)=0
virtual bool hasFather(const std::shared_ptr< N > nodeObject) const =0
virtual std::shared_ptr< N > getFatherOfEdge(const std::shared_ptr< E > edge) const =0
AssociationGraphObserver< N, E >::EdgeIterator EdgeIterator
virtual std::unique_ptr< NodeIterator > sonsIterator(std::shared_ptr< N > node)=0
virtual size_t getNumberOfFathers(const std::shared_ptr< N > node) const =0
virtual std::vector< std::shared_ptr< N > > getBelowNodes(const std::shared_ptr< N > localRoot)=0
Get Below Objects.
virtual std::vector< std::shared_ptr< N > > getFathers(const std::shared_ptr< N > node) const =0
virtual void removeFather(const std::shared_ptr< N > node, const std::shared_ptr< N > father)=0
virtual bool isValid() const =0
virtual bool isRooted() const =0
virtual size_t getNumberOfSons(const std::shared_ptr< N > node) const =0
DAGraph::NodeId NodeGraphid
virtual void removeSon(const std::shared_ptr< N > node, const std::shared_ptr< N > son)=0
AssociationDAGraphObserver< N, E >::NodeIndex NodeIndex
virtual std::vector< std::shared_ptr< N > > removeFathers(const std::shared_ptr< N > node)=0
virtual void addSon(const std::shared_ptr< N > nodeObject, const std::shared_ptr< N > sonNodeObject, const std::shared_ptr< E > edgeObject=0)=0
virtual std::shared_ptr< N > getSon(const std::shared_ptr< E > edge) const =0