bpp-core3
3.0.0
|
#include <Bpp/Graph/AssociationGraphImplObserver.h>
Classes | |
class | EdgeIteratorClass |
class | NodeIteratorClass |
Public Types | |
typedef AssociationGraphObserver< N, E >::NodeIndex | NodeIndex |
typedef AssociationGraphObserver< N, E >::EdgeIndex | EdgeIndex |
typedef Graph::NodeId | NodeGraphid |
typedef Graph::EdgeId | EdgeGraphid |
using | Eref = std::shared_ptr< E > |
using | Nref = std::shared_ptr< N > |
Public Member Functions | |
Graph Relations Management | |
Modificating the structure of the graph. | |
void | createNode (Nref nodeObject) |
void | createNode (Nref objectOriginNode, Nref newNodeObject, Eref newEdgeObject=00) |
void | link (Nref nodeObjectA, Nref nodeObjectB, Eref edgeObject=00) |
void | unlink (Nref nodeObjectA, Nref nodeObjectB) |
void | deleteNode (Nref nodeObject) |
Object Association | |
void | associateNode (Nref nodeObject, NodeGraphid graphNode) |
void | associateEdge (Eref edgeObject, EdgeGraphid graphEdge) |
void | dissociateNode (Nref nodeObject) |
void | dissociateEdge (Eref edgeObject) |
NodeGraphid | getNodeGraphid (const Nref nodeObject) const |
EdgeGraphid | getEdgeGraphid (const Eref edgeObject) const |
Nref | getNodeFromGraphid (NodeGraphid node) |
const Nref | getNodeFromGraphid (NodeGraphid node) const |
std::vector< Nref > | getNodesFromGraphid (std::vector< NodeGraphid > nodes) const |
Eref | getEdgeFromGraphid (EdgeGraphid edge) |
const Eref | getEdgeFromGraphid (EdgeGraphid edge) const |
std::vector< Eref > | getEdgesFromGraphid (std::vector< EdgeGraphid > edges) const |
void | setRoot (const Nref newRoot) |
set the root (but no checking, to be used at first construction) More... | |
Nref | getRoot () const |
NodeIndex | getRootIndex () const |
Object Indexation | |
Get or set indexes to nodes and edges | |
bool | hasNodeIndex (const Nref nodeObject) const |
return if the object has an index. More... | |
bool | hasEdgeIndex (const Eref edgeObject) const |
NodeIndex | getNodeIndex (const Nref nodeObject) const |
std::vector< NodeIndex > | getNodeIndexes (std::vector< Nref > nodes) const |
EdgeIndex | getEdgeIndex (const Eref edgeObject) const |
std::vector< EdgeIndex > | getEdgeIndexes (std::vector< Eref > edges) const |
NodeIndex | setNodeIndex (const Nref nodeObject, NodeIndex index) |
EdgeIndex | setEdgeIndex (const Eref edgeObject, EdgeIndex index) |
NodeIndex | addNodeIndex (const Nref nodeObject) |
EdgeIndex | addEdgeIndex (const Eref edgeObject) |
bool | hasNode (NodeIndex node) const |
bool | hasEdge (EdgeIndex edge) const |
Nref | getNode (NodeIndex node) const |
Eref | getEdge (EdgeIndex edge) const |
Topology exploration | |
These methodes of the graph concern the topology exploration. | |
void | outputToDot (const std::string &fname, const std::string &name) const |
void | outputToDot (std::ostream &out, const std::string &name) const |
Iterators on Nodes | |
std::unique_ptr< typename AssociationGraphObserver< N, E >::NodeIterator > | allNodesIterator () |
std::unique_ptr< typename AssociationGraphObserver< N, E >::NodeIterator > | allNodesIterator () const |
std::unique_ptr< typename AssociationGraphObserver< N, E >::NodeIterator > | outgoingNeighborNodesIterator (Nref node) |
std::unique_ptr< typename AssociationGraphObserver< N, E >::NodeIterator > | outgoingNeighborNodesIterator (Nref node) const |
std::unique_ptr< typename AssociationGraphObserver< N, E >::NodeIterator > | incomingNeighborNodesIterator (Nref node) |
std::unique_ptr< typename AssociationGraphObserver< N, E >::NodeIterator > | incomingNeighborNodesIterator (Nref node) const |
std::vector< Nref > | getNeighbors (const Nref node) const |
std::vector< NodeIndex > | getNeighbors (NodeIndex node) const |
std::vector< Eref > | getEdges (const Nref node) const |
std::vector< EdgeIndex > | getEdges (NodeIndex node) const |
std::vector< Nref > | getOutgoingNeighbors (const Nref node) const |
std::vector< NodeIndex > | getOutgoingNeighbors (NodeIndex node) const |
std::vector< Eref > | getOutgoingEdges (const Nref node) const |
std::vector< EdgeIndex > | getOutgoingEdges (NodeIndex node) const |
std::vector< Nref > | getIncomingNeighbors (const Nref node) const |
std::vector< NodeIndex > | getIncomingNeighbors (NodeIndex node) const |
std::vector< Eref > | getIncomingEdges (const Nref node) const |
std::vector< EdgeIndex > | getIncomingEdges (NodeIndex node) const |
std::vector< Nref > | getLeavesFromNode (Nref node, unsigned int maxDepth) const |
std::vector< Nref > | getAllLeaves () const |
std::vector< NodeIndex > | getAllLeavesIndexes () const |
std::vector< Nref > | getAllInnerNodes () const |
std::vector< NodeIndex > | getAllInnerNodesIndexes () const |
std::vector< Nref > | getAllNodes () const |
std::vector< NodeIndex > | getAllNodesIndexes () const |
std::vector< EdgeIndex > | getAllEdgesIndexes () const |
std::unique_ptr< typename AssociationGraphObserver< N, E >::EdgeIterator > | allEdgesIterator () |
std::unique_ptr< typename AssociationGraphObserver< N, E >::EdgeIterator > | allEdgesIterator () const |
std::unique_ptr< typename AssociationGraphObserver< N, E >::EdgeIterator > | outgoingEdgesIterator (Nref node) |
std::unique_ptr< typename AssociationGraphObserver< N, E >::EdgeIterator > | outgoingEdgesIterator (Nref node) const |
std::unique_ptr< typename AssociationGraphObserver< N, E >::EdgeIterator > | incomingEdgesIterator (Nref node) |
std::unique_ptr< typename AssociationGraphObserver< N, E >::EdgeIterator > | incomingEdgesIterator (Nref node) const |
std::vector< Eref > | getAllEdges () const |
bool | isLeaf (const Nref node) const |
Is the node a leaf? More... | |
bool | isLeaf (const NodeIndex nodeid) const |
std::pair< Nref, Nref > | getNodes (Eref edge) const |
Eref | getEdgeLinking (Nref nodeA, Nref nodeB) const |
void | setEdgeLinking (Nref nodeA, Nref nodeB, Eref edge) |
Function called by the subjectGraph | |
These methodes are called by the subject graph to make this observer so fit the subject graph | |
void | deletedEdgesUpdate (const std::vector< unsigned int > &edgesToDelete) |
void | deletedNodesUpdate (const std::vector< unsigned int > &nodesToDelete) |
Object Indexation | |
Get or set indexes to nodes and edges | |
virtual std::vector< NodeIndex > | getNodeIndexes (std::vector< std::shared_ptr< N >> nodeObjects) const =0 |
virtual std::vector< EdgeIndex > | getEdgeIndexes (std::vector< std::shared_ptr< E >> edgeObjects) const =0 |
Static Public Member Functions | |
template<class A , class B > | |
static B * | copy (const A &a, typename std::enable_if< !std::is_base_of< B, A >::value &&!std::is_abstract< B >::value, B *>::type *=0) |
template<class A , class B > | |
static B * | copy (const A &a, typename std::enable_if< !std::is_base_of< B, A >::value &&std::is_abstract< B >::value, B *>::type *=0) |
template<class A , class B > | |
static B * | copy (const A &a, typename std::enable_if< std::is_base_of< B, A >::value &&!std::is_abstract< A >::value, B *>::type *=0) |
template<class A , class B > | |
static B * | copy (const A &a, typename std::enable_if< std::is_base_of< B, A >::value &&std::is_abstract< A >::value &&std::is_base_of< Clonable, A >::value, B *>::type *=0) |
template<class A , class B > | |
static B * | copy (const A &a, typename std::enable_if< std::is_base_of< B, A >::value &&std::is_abstract< A >::value &&!std::is_base_of< Clonable, A >::value, B *>::type *=0) |
Protected Attributes | |
std::shared_ptr< GraphImpl > | subjectGraph_ |
enum | neighborType { INCOMING, OUTGOING, BOTH } |
std::vector< Nref > | graphidToN_ |
std::vector< Eref > | graphidToE_ |
std::map< Nref, NodeGraphid > | NToGraphid_ |
std::map< Eref, EdgeGraphid > | EToGraphid_ |
std::vector< Nref > | indexToN_ |
std::vector< Eref > | indexToE_ |
std::map< Nref, NodeIndex > | NToIndex_ |
std::map< Eref, EdgeIndex > | EToIndex_ |
AssociationGraphImplObserver (bool directed=false) | |
AssociationGraphImplObserver (std::shared_ptr< GraphImpl > subjectGraph=00) | |
Constructor. More... | |
template<class N2 , class E2 > | |
AssociationGraphImplObserver (AssociationGraphImplObserver< N2, E2, GraphImpl > const &graphObserver) | |
AssociationGraphImplObserver (AssociationGraphImplObserver< N, E, GraphImpl > const &graphObserver) | |
AssociationGraphImplObserver< N, E, GraphImpl > & | operator= (bpp::AssociationGraphImplObserver< N, E, GraphImpl > const &graphObserver) |
~AssociationGraphImplObserver () | |
AssociationGraphImplObserver< N, E, GraphImpl > * | clone () const |
const std::shared_ptr< GraphImpl > | getGraph () const |
std::shared_ptr< GraphImpl > | getGraph () |
bool | hasNode (Nref nodeObject) const |
bool | hasEdge (Eref edgeObject) const |
std::string | nodeToString (const Nref nodeObject) const |
std::string | edgeToString (const Eref edgeObject) const |
std::vector< Nref > | getNeighbors_ (const Nref nodeObject, neighborType type) const |
std::vector< Eref > | getEdges_ (const Nref nodeObject, neighborType type) const |
General Info | |
template<typename N2 , typename E2 , typename G2 > | |
class | AssociationGraphImplObserver |
size_t | getNumberOfNodes () const |
size_t | getNumberOfEdges () const |
size_t | getNumberOfLeaves () const |
size_t | getDegree (const Nref node) const |
Definition at line 26 of file AssociationGraphImplObserver.h.
typedef Graph::EdgeId bpp::AssociationGraphImplObserver< N, E, GraphImpl >::EdgeGraphid |
Definition at line 33 of file AssociationGraphImplObserver.h.
typedef AssociationGraphObserver<N, E>::EdgeIndex bpp::AssociationGraphImplObserver< N, E, GraphImpl >::EdgeIndex |
Definition at line 30 of file AssociationGraphImplObserver.h.
using bpp::AssociationGraphImplObserver< N, E, GraphImpl >::Eref = std::shared_ptr<E> |
Definition at line 35 of file AssociationGraphImplObserver.h.
typedef Graph::NodeId bpp::AssociationGraphImplObserver< N, E, GraphImpl >::NodeGraphid |
Definition at line 32 of file AssociationGraphImplObserver.h.
typedef AssociationGraphObserver<N, E>::NodeIndex bpp::AssociationGraphImplObserver< N, E, GraphImpl >::NodeIndex |
Definition at line 29 of file AssociationGraphImplObserver.h.
using bpp::AssociationGraphImplObserver< N, E, GraphImpl >::Nref = std::shared_ptr<N> |
Definition at line 36 of file AssociationGraphImplObserver.h.
|
private |
defines a type of neighbors : incoming and/or outgoing
Enumerator | |
---|---|
INCOMING | |
OUTGOING | |
BOTH |
Definition at line 379 of file AssociationGraphImplObserver.h.
|
inline |
Constructor
directed | is the graph directed |
Definition at line 115 of file AssociationGraphImplObserver.h.
|
inline |
Constructor.
subjectGraph | the graph which is observed. If == 00, a new Graph is built. |
Definition at line 138 of file AssociationGraphImplObserver.h.
|
inline |
Copy Constructor
graphObserver | the graphObserver to be copied |
Definition at line 158 of file AssociationGraphImplObserver.h.
|
inline |
Definition at line 204 of file AssociationGraphImplObserver.h.
|
inline |
Destructor
Definition at line 305 of file AssociationGraphImplObserver.h.
|
inline |
Add an index associated to an edge
edgeObject | object to which one want to set the index |
Definition at line 852 of file AssociationGraphImplObserver.h.
|
inline |
Set an new index associated to a node
nodeObject | object to which one want to set the index |
Definition at line 821 of file AssociationGraphImplObserver.h.
|
inlinevirtual |
Implements bpp::AssociationGraphObserver< N, E >.
Definition at line 1363 of file AssociationGraphImplObserver.h.
|
inline |
Definition at line 1368 of file AssociationGraphImplObserver.h.
|
inlinevirtual |
Implements bpp::AssociationGraphObserver< N, E >.
Definition at line 1025 of file AssociationGraphImplObserver.h.
|
inlinevirtual |
Implements bpp::AssociationGraphObserver< N, E >.
Definition at line 1030 of file AssociationGraphImplObserver.h.
|
inlinevirtual |
Associate a E object to an edge in the graph.
edgeObject | object to associate |
graphEdge | existing edge to be associated |
Implements bpp::AssociationGraphObserver< N, E >.
Definition at line 554 of file AssociationGraphImplObserver.h.
Referenced by bpp::AssociationGraphImplObserver< N, E, TreeGraphImpl >::setEdgeLinking().
|
inlinevirtual |
Associate a N object to a node in the graph.
nodeObject | object to associate |
graphNode | existing node to be associated |
Implements bpp::AssociationGraphObserver< N, E >.
Definition at line 534 of file AssociationGraphImplObserver.h.
Referenced by bpp::AssociationGraphImplObserver< N, E, TreeGraphImpl >::createNode().
|
inlinevirtual |
clone function
Implements bpp::Clonable.
Definition at line 313 of file AssociationGraphImplObserver.h.
|
inlinestaticinherited |
Specific copy of A and B objects, if clonable or not.
Definition at line 45 of file AssociationGraphObserver.h.
|
inlinestaticinherited |
Definition at line 51 of file AssociationGraphObserver.h.
|
inlinestaticinherited |
Definition at line 58 of file AssociationGraphObserver.h.
|
inlinestaticinherited |
Definition at line 64 of file AssociationGraphObserver.h.
|
inlinestaticinherited |
Definition at line 70 of file AssociationGraphObserver.h.
References bpp::AssociationGraphObserver< N, E >::associateEdge(), bpp::AssociationGraphObserver< N, E >::associateNode(), bpp::AssociationGraphObserver< N, E >::createNode(), bpp::AssociationGraphObserver< N, E >::deleteNode(), bpp::AssociationGraphObserver< N, E >::dissociateEdge(), bpp::AssociationGraphObserver< N, E >::dissociateNode(), bpp::AssociationGraphObserver< N, E >::getEdge(), bpp::AssociationGraphObserver< N, E >::getEdgeFromGraphid(), bpp::AssociationGraphObserver< N, E >::getEdgeGraphid(), bpp::AssociationGraphObserver< N, E >::getEdgeIndex(), bpp::AssociationGraphObserver< N, E >::getEdgeIndexes(), bpp::AssociationGraphObserver< N, E >::getEdgesFromGraphid(), bpp::AssociationGraphObserver< N, E >::getNode(), bpp::AssociationGraphObserver< N, E >::getNodeFromGraphid(), bpp::AssociationGraphObserver< N, E >::getNodeGraphid(), bpp::AssociationGraphObserver< N, E >::getNodeIndex(), bpp::AssociationGraphObserver< N, E >::getNodeIndexes(), bpp::AssociationGraphObserver< N, E >::getNodesFromGraphid(), bpp::AssociationGraphObserver< N, E >::getRoot(), bpp::AssociationGraphObserver< N, E >::getRootIndex(), bpp::AssociationGraphObserver< N, E >::hasEdge(), bpp::AssociationGraphObserver< N, E >::hasEdgeIndex(), bpp::AssociationGraphObserver< N, E >::hasNode(), bpp::AssociationGraphObserver< N, E >::hasNodeIndex(), bpp::AssociationGraphObserver< N, E >::link(), bpp::AssociationGraphObserver< N, E >::setEdgeIndex(), bpp::AssociationGraphObserver< N, E >::setNodeIndex(), and bpp::AssociationGraphObserver< N, E >::unlink().
|
inlinevirtual |
Creates an orphaned node from a NodeClass object.
nodeObject | the N object associated to the node in the graph. |
Implements bpp::AssociationGraphObserver< N, E >.
Definition at line 438 of file AssociationGraphImplObserver.h.
Referenced by bpp::AssociationGraphImplObserver< N, E, TreeGraphImpl >::createNode().
|
inlinevirtual |
Creates an node linked to an existing node. Order of parameters match the link method.
objectOriginNode | existing node. In a directed graph: origin -> newNode. |
newNodeObject | the N object associated to the node in the graph. |
newEdgeObject | the optional edge between the nodes (default = 00) |
Implements bpp::AssociationGraphObserver< N, E >.
Definition at line 455 of file AssociationGraphImplObserver.h.
|
inlinevirtual |
Delete unused object edges, since they have been deleted in the graph
edgesToDelete | a vector of Edges to delete |
Implements bpp::GraphObserver.
Definition at line 1477 of file AssociationGraphImplObserver.h.
|
inlinevirtual |
Delete unused object nodes, since they have been deleted in the graph
nodesToDelete | a vector of N to delete |
Implements bpp::GraphObserver.
Definition at line 1495 of file AssociationGraphImplObserver.h.
|
inlinevirtual |
Deletes a node
nodeObject | node to be deleted. The N node object given in argument is not deleted. |
Implements bpp::AssociationGraphObserver< N, E >.
Definition at line 513 of file AssociationGraphImplObserver.h.
|
inlinevirtual |
Implements bpp::AssociationGraphObserver< N, E >.
Definition at line 581 of file AssociationGraphImplObserver.h.
|
inlinevirtual |
Dissociate a N or E object to a node or an edge in the graph.
nodeObject | object to dissociate |
Implements bpp::AssociationGraphObserver< N, E >.
Definition at line 573 of file AssociationGraphImplObserver.h.
Referenced by bpp::AssociationGraphImplObserver< N, E, TreeGraphImpl >::deleteNode().
|
inline |
Definition at line 361 of file AssociationGraphImplObserver.h.
Referenced by bpp::AssociationGraphImplObserver< N, E, TreeGraphImpl >::addEdgeIndex(), bpp::AssociationGraphImplObserver< N, E, TreeGraphImpl >::associateEdge(), bpp::AssociationGraphImplObserver< N, E, TreeGraphImpl >::getEdgeIndex(), bpp::AssociationGraphImplObserver< N, E, TreeGraphImpl >::link(), and bpp::AssociationGraphImplObserver< N, E, TreeGraphImpl >::setEdgeIndex().
|
inlinevirtual |
Get all the defined branches of a graph,
Implements bpp::AssociationGraphObserver< N, E >.
Definition at line 1405 of file AssociationGraphImplObserver.h.
|
inlinevirtual |
Get indexes of all defined edges of a graph,
They are in the same order as the graphIds (and not necessary Indexes).
Implements bpp::AssociationGraphObserver< N, E >.
Definition at line 1316 of file AssociationGraphImplObserver.h.
|
inlinevirtual |
Get all the inner nodes of a graph, ie, nodes with degree >= 2.
They are in the same order as the graphIds (and not necessary Indexes).
Implements bpp::AssociationGraphObserver< N, E >.
Definition at line 1236 of file AssociationGraphImplObserver.h.
|
inlinevirtual |
Get the indexes of all inner nodes of a graph, ie, nodes with degree >= 2.
They are in the same order as the graphIds (and not necessary Indexes).
Implements bpp::AssociationGraphObserver< N, E >.
Definition at line 1257 of file AssociationGraphImplObserver.h.
|
inlinevirtual |
Get all the leaves objects of a graph, ie, nodes with only one neighbor,
They are in the same order as the graphIds (and not necessary Indexes).
Implements bpp::AssociationGraphObserver< N, E >.
Definition at line 1193 of file AssociationGraphImplObserver.h.
|
inlinevirtual |
Get index of the leaves objects of a graph, ie, nodes with only one neighbor,
They are in the same order as the graphIds (and not necessary Indexes).
Implements bpp::AssociationGraphObserver< N, E >.
Definition at line 1214 of file AssociationGraphImplObserver.h.
|
inlinevirtual |
Get all the defined nodes of a graph,
They are in the same order as the graphIds (and not necessary Indexes).
Implements bpp::AssociationGraphObserver< N, E >.
Definition at line 1278 of file AssociationGraphImplObserver.h.
Referenced by bpp::AssociationGraphImplObserver< N, E, TreeGraphImpl >::outputToDot().
|
inlinevirtual |
Get indexes of all defined nodes of a graph,
They are in the same order as the graphIds (and not necessary Indexes).
Implements bpp::AssociationGraphObserver< N, E >.
Definition at line 1297 of file AssociationGraphImplObserver.h.
|
inline |
Return the number of neighbors of a node
node | the concerned node |
Definition at line 1559 of file AssociationGraphImplObserver.h.
|
inlinevirtual |
Return the associated Node index
edge | object which to return the node index |
Implements bpp::AssociationGraphObserver< N, E >.
Definition at line 911 of file AssociationGraphImplObserver.h.
Referenced by bpp::AssociationGraphImplObserver< N, E, TreeGraphImpl >::getEdgeLinking(), and bpp::AssociationGraphImplObserver< N, E, TreeGraphImpl >::setEdgeLinking().
|
inlinevirtual |
Implements bpp::AssociationGraphObserver< N, E >.
Definition at line 649 of file AssociationGraphImplObserver.h.
Referenced by bpp::AssociationGraphImplObserver< N, E, TreeGraphImpl >::getEdgeLinking(), bpp::AssociationGraphImplObserver< N, E, GraphImpl >::EdgeIteratorClass< GraphIterator, is_const >::next(), bpp::AssociationGraphImplObserver< N, E, GraphImpl >::EdgeIteratorClass< GraphIterator, is_const >::operator*(), and bpp::AssociationGraphImplObserver< N, E, GraphImpl >::EdgeIteratorClass< GraphIterator, is_const >::start().
|
inlinevirtual |
Implements bpp::AssociationGraphObserver< N, E >.
Definition at line 657 of file AssociationGraphImplObserver.h.
|
inlinevirtual |
Return the associated Edge ID
edgeObject | object which to return the node ID |
Implements bpp::AssociationGraphObserver< N, E >.
Definition at line 608 of file AssociationGraphImplObserver.h.
Referenced by bpp::AssociationGraphImplObserver< N, E, TreeGraphImpl >::getNodes().
|
inlinevirtual |
Return the associated Node index
edgeObject | object which to return the node index |
Implements bpp::AssociationGraphObserver< N, E >.
Definition at line 751 of file AssociationGraphImplObserver.h.
Referenced by bpp::AssociationGraphImplObserver< N, E, TreeGraphImpl >::edgeToString(), bpp::AssociationGraphImplObserver< N, E, TreeGraphImpl >::getAllEdgesIndexes(), bpp::AssociationGraphImplObserver< N, E, TreeGraphImpl >::getEdgeIndexes(), and bpp::AssociationGraphImplObserver< N, E, TreeGraphImpl >::outputToDot().
|
pure virtualinherited |
Referenced by bpp::AssociationGraphObserver< N, E >::copy().
|
inline |
Definition at line 759 of file AssociationGraphImplObserver.h.
Referenced by bpp::AssociationGraphImplObserver< N, E, TreeGraphImpl >::getEdges(), bpp::AssociationGraphImplObserver< N, E, TreeGraphImpl >::getIncomingEdges(), and bpp::AssociationGraphImplObserver< N, E, TreeGraphImpl >::getOutgoingEdges().
|
inlinevirtual |
Returns the Edge between two nodes nodeA -> nodeB
nodeA | source node (if directed) |
nodeB | destination node (if directed) |
Implements bpp::AssociationGraphObserver< N, E >.
Definition at line 1449 of file AssociationGraphImplObserver.h.
Referenced by bpp::AssociationGraphImplObserver< N, E, TreeGraphImpl >::outputToDot().
|
inlinevirtual |
Get all the edges of a node in the graph.
node | the node one wants to get its edges |
Implements bpp::AssociationGraphObserver< N, E >.
Definition at line 1096 of file AssociationGraphImplObserver.h.
Referenced by bpp::AssociationGraphImplObserver< N, E, TreeGraphImpl >::getEdges().
|
inlinevirtual |
Implements bpp::AssociationGraphObserver< N, E >.
Definition at line 1101 of file AssociationGraphImplObserver.h.
|
inlineprivate |
Get incoming / outgoing edges according to the enum type
Definition at line 407 of file AssociationGraphImplObserver.h.
|
inlinevirtual |
Implements bpp::AssociationGraphObserver< N, E >.
Definition at line 665 of file AssociationGraphImplObserver.h.
Referenced by bpp::AssociationDAGraphImplObserver< N, E, DAGraphImpl >::getBelowEdges(), bpp::AssociationGraphImplObserver< N, E, TreeGraphImpl >::getEdges(), bpp::AssociationGraphImplObserver< N, E, TreeGraphImpl >::getEdges_(), bpp::AssociationGraphImplObserver< N, E, TreeGraphImpl >::getIncomingEdges(), bpp::AssociationGraphImplObserver< N, E, TreeGraphImpl >::getOutgoingEdges(), and bpp::AssociationTreeGraphImplObserver< N, E, TreeGraphImpl >::getSubtreeEdges().
|
inline |
Definition at line 315 of file AssociationGraphImplObserver.h.
Referenced by bpp::AssociationGraphImplObserver< N, E, TreeGraphImpl >::AssociationGraphImplObserver(), bpp::AssociationGraphImplObserver< N, E, TreeGraphImpl >::createNode(), bpp::AssociationGraphImplObserver< N, E, TreeGraphImpl >::deleteNode(), bpp::AssociationGraphImplObserver< N, E, TreeGraphImpl >::getAllInnerNodes(), bpp::AssociationGraphImplObserver< N, E, TreeGraphImpl >::getAllInnerNodesIndexes(), bpp::AssociationGraphImplObserver< N, E, TreeGraphImpl >::getAllLeaves(), bpp::AssociationGraphImplObserver< N, E, TreeGraphImpl >::getAllLeavesIndexes(), bpp::AssociationGraphImplObserver< N, E, TreeGraphImpl >::getDegree(), bpp::AssociationGraphImplObserver< N, E, TreeGraphImpl >::getEdgeLinking(), bpp::AssociationGraphImplObserver< N, E, TreeGraphImpl >::getEdges(), bpp::AssociationGraphImplObserver< N, E, TreeGraphImpl >::getEdges_(), bpp::AssociationGraphImplObserver< N, E, TreeGraphImpl >::getIncomingEdges(), bpp::AssociationGraphImplObserver< N, E, TreeGraphImpl >::getIncomingNeighbors(), bpp::AssociationGraphImplObserver< N, E, TreeGraphImpl >::getLeavesFromNode(), bpp::AssociationGraphImplObserver< N, E, TreeGraphImpl >::getNeighbors(), bpp::AssociationGraphImplObserver< N, E, TreeGraphImpl >::getNeighbors_(), bpp::AssociationGraphImplObserver< N, E, TreeGraphImpl >::getNodes(), bpp::AssociationGraphImplObserver< N, E, TreeGraphImpl >::getOutgoingEdges(), bpp::AssociationGraphImplObserver< N, E, TreeGraphImpl >::getOutgoingNeighbors(), bpp::AssociationGraphImplObserver< N, E, TreeGraphImpl >::getRoot(), bpp::AssociationGraphImplObserver< N, E, TreeGraphImpl >::getRootIndex(), bpp::AssociationGraphImplObserver< N, E, TreeGraphImpl >::isLeaf(), bpp::AssociationGraphImplObserver< N, E, TreeGraphImpl >::link(), bpp::AssociationGraphImplObserver< N, E, TreeGraphImpl >::operator=(), bpp::AssociationGraphImplObserver< N, E, TreeGraphImpl >::outputToDot(), bpp::AssociationGraphImplObserver< N, E, TreeGraphImpl >::setEdgeLinking(), bpp::AssociationGraphImplObserver< N, E, TreeGraphImpl >::setRoot(), bpp::AssociationGraphImplObserver< N, E, TreeGraphImpl >::unlink(), and bpp::AssociationGraphImplObserver< N, E, TreeGraphImpl >::~AssociationGraphImplObserver().
|
inline |
Definition at line 320 of file AssociationGraphImplObserver.h.
|
inlinevirtual |
In an directed graph, get all the edges which are coming to a node in the graph.
node | the node one wants to get its edges |
Implements bpp::AssociationGraphObserver< N, E >.
Definition at line 1162 of file AssociationGraphImplObserver.h.
Referenced by bpp::AssociationGraphImplObserver< N, E, TreeGraphImpl >::getIncomingEdges().
|
inlinevirtual |
Implements bpp::AssociationGraphObserver< N, E >.
Definition at line 1167 of file AssociationGraphImplObserver.h.
|
inlinevirtual |
In an directed graph, get all the neighbors which are coming to a node in the graph.
node | the node one wants to get its neighbors |
Implements bpp::AssociationGraphObserver< N, E >.
Definition at line 1145 of file AssociationGraphImplObserver.h.
Referenced by bpp::AssociationGraphImplObserver< N, E, TreeGraphImpl >::getIncomingNeighbors().
|
inlinevirtual |
Implements bpp::AssociationGraphObserver< N, E >.
Definition at line 1150 of file AssociationGraphImplObserver.h.
|
inlinevirtual |
Get the leaves of a graph, ie, nodes with only one neighbor, starting from a peculiar node, with maxDepth recursion depths.
node | the starting node |
maxDepth | the max recursion depth |
They are in the same order as the graphIds (and not necessary Indexes).
Implements bpp::AssociationGraphObserver< N, E >.
Definition at line 1182 of file AssociationGraphImplObserver.h.
Referenced by bpp::AssociationGraphImplObserver< N, E, TreeGraphImpl >::getLeavesFromNode().
|
inlinevirtual |
Get all the neighbors of a node in the graph.
node | the node one wants to get its neighbors |
They are in the same order as the graphIds (and not necessary Indexes).
Implements bpp::AssociationGraphObserver< N, E >.
Definition at line 1073 of file AssociationGraphImplObserver.h.
Referenced by bpp::AssociationGraphImplObserver< N, E, TreeGraphImpl >::getNeighbors().
|
inlinevirtual |
Get the index of all neighbors of a node in the graph.
node | the node one wants to get its neighbors |
They are in the same order as the graphIds (and not necessary Indexes).
Implements bpp::AssociationGraphObserver< N, E >.
Definition at line 1085 of file AssociationGraphImplObserver.h.
|
inlineprivate |
Get incoming / outgoing neighbors according to the enum type
Definition at line 384 of file AssociationGraphImplObserver.h.
|
inlinevirtual |
Return the associated Node index
node | object which to return the node index |
Implements bpp::AssociationGraphObserver< N, E >.
Definition at line 901 of file AssociationGraphImplObserver.h.
Referenced by bpp::AssociationGraphImplObserver< N, E, TreeGraphImpl >::getEdges(), bpp::AssociationGraphImplObserver< N, E, TreeGraphImpl >::getIncomingEdges(), bpp::AssociationGraphImplObserver< N, E, TreeGraphImpl >::getIncomingNeighbors(), bpp::AssociationGraphImplObserver< N, E, TreeGraphImpl >::getNeighbors(), bpp::AssociationGraphImplObserver< N, E, TreeGraphImpl >::getOutgoingEdges(), bpp::AssociationGraphImplObserver< N, E, TreeGraphImpl >::getOutgoingNeighbors(), and bpp::AssociationGraphImplObserver< N, E, TreeGraphImpl >::isLeaf().
|
inlinevirtual |
Transforms an (a list of) id(s) into an (a list of) object(s)
Implements bpp::AssociationGraphObserver< N, E >.
Definition at line 620 of file AssociationGraphImplObserver.h.
Referenced by bpp::AssociationGraphImplObserver< N, E, TreeGraphImpl >::getNodes(), bpp::AssociationGraphImplObserver< N, E, TreeGraphImpl >::getRoot(), bpp::AssociationGraphImplObserver< N, E, TreeGraphImpl >::getRootIndex(), bpp::AssociationGraphImplObserver< N, E, GraphImpl >::NodeIteratorClass< GraphIterator, is_const >::next(), bpp::AssociationGraphImplObserver< N, E, GraphImpl >::NodeIteratorClass< GraphIterator, is_const >::operator*(), and bpp::AssociationGraphImplObserver< N, E, GraphImpl >::NodeIteratorClass< GraphIterator, is_const >::start().
|
inlinevirtual |
Transforms an (a list of) id(s) into an (a list of) object(s)
Implements bpp::AssociationGraphObserver< N, E >.
Definition at line 627 of file AssociationGraphImplObserver.h.
|
inlinevirtual |
Return the associated Node ID
nodeObject | object which to return the node ID |
Implements bpp::AssociationGraphObserver< N, E >.
Definition at line 594 of file AssociationGraphImplObserver.h.
Referenced by bpp::AssociationGraphImplObserver< N, E, TreeGraphImpl >::deleteNode(), bpp::AssociationGraphImplObserver< N, E, TreeGraphImpl >::getDegree(), bpp::AssociationGraphImplObserver< N, E, TreeGraphImpl >::getEdgeLinking(), bpp::AssociationGraphImplObserver< N, E, TreeGraphImpl >::getEdges(), bpp::AssociationGraphImplObserver< N, E, TreeGraphImpl >::getEdges_(), bpp::AssociationGraphImplObserver< N, E, TreeGraphImpl >::getIncomingEdges(), bpp::AssociationGraphImplObserver< N, E, TreeGraphImpl >::getIncomingNeighbors(), bpp::AssociationGraphImplObserver< N, E, TreeGraphImpl >::getLeavesFromNode(), bpp::AssociationGraphImplObserver< N, E, TreeGraphImpl >::getNeighbors(), bpp::AssociationGraphImplObserver< N, E, TreeGraphImpl >::getNeighbors_(), bpp::AssociationGraphImplObserver< N, E, TreeGraphImpl >::getOutgoingEdges(), bpp::AssociationGraphImplObserver< N, E, TreeGraphImpl >::getOutgoingNeighbors(), bpp::AssociationGraphImplObserver< N, E, TreeGraphImpl >::isLeaf(), bpp::AssociationGraphImplObserver< N, E, TreeGraphImpl >::setEdgeLinking(), and bpp::AssociationGraphImplObserver< N, E, TreeGraphImpl >::setRoot().
|
inlinevirtual |
Return the associated Node index
nodeObject | object which to return the node index |
Implements bpp::AssociationGraphObserver< N, E >.
Definition at line 728 of file AssociationGraphImplObserver.h.
Referenced by bpp::AssociationGraphImplObserver< N, E, TreeGraphImpl >::getAllInnerNodesIndexes(), bpp::AssociationGraphImplObserver< N, E, TreeGraphImpl >::getAllLeavesIndexes(), bpp::AssociationGraphImplObserver< N, E, TreeGraphImpl >::getAllNodesIndexes(), bpp::AssociationGraphImplObserver< N, E, TreeGraphImpl >::getNodeIndexes(), bpp::AssociationGraphImplObserver< N, E, TreeGraphImpl >::getRootIndex(), bpp::AssociationGraphImplObserver< N, E, TreeGraphImpl >::nodeToString(), and bpp::AssociationGraphImplObserver< N, E, TreeGraphImpl >::outputToDot().
|
pure virtualinherited |
Referenced by bpp::AssociationGraphObserver< N, E >::copy().
|
inline |
Definition at line 737 of file AssociationGraphImplObserver.h.
Referenced by bpp::AssociationGraphImplObserver< N, E, TreeGraphImpl >::getIncomingNeighbors(), bpp::AssociationGraphImplObserver< N, E, TreeGraphImpl >::getNeighbors(), and bpp::AssociationGraphImplObserver< N, E, TreeGraphImpl >::getOutgoingNeighbors().
|
inline |
Get nodes located at the extremities of an edge
edge | an edge |
Definition at line 1437 of file AssociationGraphImplObserver.h.
Referenced by bpp::AssociationGraphImplObserver< N, E, TreeGraphImpl >::link().
|
inlinevirtual |
Implements bpp::AssociationGraphObserver< N, E >.
Definition at line 634 of file AssociationGraphImplObserver.h.
Referenced by bpp::AssociationGraphImplObserver< N, E, TreeGraphImpl >::getIncomingNeighbors(), bpp::AssociationGraphImplObserver< N, E, TreeGraphImpl >::getLeavesFromNode(), bpp::AssociationGraphImplObserver< N, E, TreeGraphImpl >::getNeighbors(), bpp::AssociationGraphImplObserver< N, E, TreeGraphImpl >::getNeighbors_(), and bpp::AssociationGraphImplObserver< N, E, TreeGraphImpl >::getOutgoingNeighbors().
|
inline |
Return the number of defined edges, ie edges that have a corresponding object in this GraphObserver
Definition at line 1531 of file AssociationGraphImplObserver.h.
|
inline |
Return the number of defined leaves, ie leaves that have a corresponding object in this GraphObserver
Definition at line 1542 of file AssociationGraphImplObserver.h.
|
inline |
Return the number of defined nodes, ie nodes that have a corresponding object in this GraphObserver
Definition at line 1521 of file AssociationGraphImplObserver.h.
|
inlinevirtual |
In an directed graph, get all the edges which are leaving a node in the graph.
node | the node one wants to get its edges |
Implements bpp::AssociationGraphObserver< N, E >.
Definition at line 1129 of file AssociationGraphImplObserver.h.
Referenced by bpp::AssociationGraphImplObserver< N, E, TreeGraphImpl >::getOutgoingEdges().
|
inlinevirtual |
Implements bpp::AssociationGraphObserver< N, E >.
Definition at line 1134 of file AssociationGraphImplObserver.h.
|
inlinevirtual |
In an directed graph, get all the neighbors which are leaving a node in the graph.
node | the node one wants to get its neighbors |
Implements bpp::AssociationGraphObserver< N, E >.
Definition at line 1113 of file AssociationGraphImplObserver.h.
Referenced by bpp::AssociationGraphImplObserver< N, E, TreeGraphImpl >::getOutgoingNeighbors(), and bpp::AssociationGraphImplObserver< N, E, TreeGraphImpl >::outputToDot().
|
inlinevirtual |
Implements bpp::AssociationGraphObserver< N, E >.
Definition at line 1118 of file AssociationGraphImplObserver.h.
|
inlinevirtual |
Implements bpp::AssociationGraphObserver< N, E >.
Definition at line 692 of file AssociationGraphImplObserver.h.
Referenced by bpp::AssociationGraphImplObserver< N, E, TreeGraphImpl >::getRoot(), and bpp::AssociationGraphImplObserver< N, E, TreeGraphImpl >::getRootIndex().
|
inlinevirtual |
Implements bpp::AssociationGraphObserver< N, E >.
Definition at line 697 of file AssociationGraphImplObserver.h.
|
inline |
Definition at line 337 of file AssociationGraphImplObserver.h.
Referenced by bpp::AssociationGraphImplObserver< N, E, TreeGraphImpl >::associateEdge(), bpp::AssociationGraphImplObserver< N, E, TreeGraphImpl >::edgeToString(), bpp::AssociationGraphImplObserver< N, E, TreeGraphImpl >::link(), and bpp::AssociationGraphImplObserver< N, E, TreeGraphImpl >::setEdgeIndex().
|
inlinevirtual |
Return if has Edge matching EdgeIndex
edge | EdgeIndex index |
Implements bpp::AssociationGraphObserver< N, E >.
Definition at line 891 of file AssociationGraphImplObserver.h.
|
inlinevirtual |
Implements bpp::AssociationGraphObserver< N, E >.
Definition at line 718 of file AssociationGraphImplObserver.h.
Referenced by bpp::AssociationGraphImplObserver< N, E, TreeGraphImpl >::edgeToString(), and bpp::AssociationGraphImplObserver< N, E, TreeGraphImpl >::outputToDot().
|
inline |
Definition at line 330 of file AssociationGraphImplObserver.h.
Referenced by bpp::AssociationGraphImplObserver< N, E, TreeGraphImpl >::associateNode(), bpp::AssociationGraphImplObserver< N, E, TreeGraphImpl >::createNode(), bpp::AssociationGraphImplObserver< N, E, TreeGraphImpl >::link(), bpp::AssociationGraphImplObserver< N, E, TreeGraphImpl >::nodeToString(), bpp::AssociationGraphImplObserver< N, E, TreeGraphImpl >::setNodeIndex(), and bpp::AssociationGraphImplObserver< N, E, TreeGraphImpl >::unlink().
|
inlinevirtual |
Return if has Node matching NodeIndex
node | NodeIndex index |
Implements bpp::AssociationGraphObserver< N, E >.
Definition at line 882 of file AssociationGraphImplObserver.h.
|
inlinevirtual |
return if the object has an index.
Implements bpp::AssociationGraphObserver< N, E >.
Definition at line 713 of file AssociationGraphImplObserver.h.
Referenced by bpp::AssociationGraphImplObserver< N, E, TreeGraphImpl >::nodeToString(), and bpp::AssociationGraphImplObserver< N, E, TreeGraphImpl >::outputToDot().
|
inlinevirtual |
Implements bpp::AssociationGraphObserver< N, E >.
Definition at line 1391 of file AssociationGraphImplObserver.h.
|
inline |
Definition at line 1396 of file AssociationGraphImplObserver.h.
|
inlinevirtual |
Implements bpp::AssociationGraphObserver< N, E >.
Definition at line 1055 of file AssociationGraphImplObserver.h.
|
inlinevirtual |
Implements bpp::AssociationGraphObserver< N, E >.
Definition at line 1060 of file AssociationGraphImplObserver.h.
|
inline |
Is the node a leaf?
Definition at line 1421 of file AssociationGraphImplObserver.h.
Referenced by bpp::AssociationGraphImplObserver< N, E, TreeGraphImpl >::getNumberOfLeaves().
|
inline |
Definition at line 1426 of file AssociationGraphImplObserver.h.
|
inlinevirtual |
Creates a link between two existing nodes. If directed graph: nodeA -> nodeB.
nodeObjectA | source node (or first node if undirected) |
nodeObjectB | target node (or second node if undirected) |
edgeObject | the optional edge between the nodes (default = 00) |
Implements bpp::AssociationGraphObserver< N, E >.
Definition at line 470 of file AssociationGraphImplObserver.h.
Referenced by bpp::AssociationGraphImplObserver< N, E, TreeGraphImpl >::createNode().
|
inline |
Definition at line 347 of file AssociationGraphImplObserver.h.
Referenced by bpp::AssociationGraphImplObserver< N, E, TreeGraphImpl >::addNodeIndex(), bpp::AssociationGraphImplObserver< N, E, TreeGraphImpl >::associateNode(), bpp::AssociationGraphImplObserver< N, E, TreeGraphImpl >::createNode(), bpp::AssociationGraphImplObserver< N, E, TreeGraphImpl >::getNodeIndex(), bpp::AssociationGraphImplObserver< N, E, TreeGraphImpl >::link(), bpp::AssociationGraphImplObserver< N, E, TreeGraphImpl >::setNodeIndex(), and bpp::AssociationGraphImplObserver< N, E, TreeGraphImpl >::unlink().
|
inline |
= Operator
graphObserver | the graphObserver we want to copy the values |
Definition at line 255 of file AssociationGraphImplObserver.h.
Referenced by bpp::AssociationDAGraphImplObserver< N, E, DAGraphImpl >::operator=(), and bpp::AssociationTreeGraphImplObserver< N, E, TreeGraphImpl >::operator=().
|
inlinevirtual |
Implements bpp::AssociationGraphObserver< N, E >.
Definition at line 1377 of file AssociationGraphImplObserver.h.
|
inline |
Definition at line 1382 of file AssociationGraphImplObserver.h.
|
inlinevirtual |
Implements bpp::AssociationGraphObserver< N, E >.
Definition at line 1040 of file AssociationGraphImplObserver.h.
|
inlinevirtual |
Implements bpp::AssociationGraphObserver< N, E >.
Definition at line 1045 of file AssociationGraphImplObserver.h.
|
inline |
Definition at line 935 of file AssociationGraphImplObserver.h.
Referenced by bpp::AssociationGraphImplObserver< N, E, TreeGraphImpl >::outputToDot().
|
inline |
Definition at line 943 of file AssociationGraphImplObserver.h.
|
inlinevirtual |
Set an index associated to an edge
edgeObject | object to which one want to set the index |
index | intex to be given, 0 to get the first free index |
Implements bpp::AssociationGraphObserver< N, E >.
Definition at line 798 of file AssociationGraphImplObserver.h.
|
inlinevirtual |
Sets the Edge between two nodes nodeA -> nodeB
nodeA | source node (if directed) |
nodeB | destination node (if directed) |
edge | the edge between these two nodes |
Implements bpp::AssociationGraphObserver< N, E >.
Definition at line 1460 of file AssociationGraphImplObserver.h.
|
inlinevirtual |
Set an index associated to a node
nodeObject | object to which one want to set the index |
index | index to be given |
Implements bpp::AssociationGraphObserver< N, E >.
Definition at line 774 of file AssociationGraphImplObserver.h.
|
inline |
set the root (but no checking, to be used at first construction)
Definition at line 684 of file AssociationGraphImplObserver.h.
|
inlinevirtual |
Deletes the link between two existing nodes in the graph.
Implements bpp::AssociationGraphObserver< N, E >.
Definition at line 497 of file AssociationGraphImplObserver.h.
|
friend |
Definition at line 1566 of file AssociationGraphImplObserver.h.
|
private |
Can find an Edge with the corresponding object.
Definition at line 73 of file AssociationGraphImplObserver.h.
Referenced by bpp::AssociationGraphImplObserver< N, E, TreeGraphImpl >::AssociationGraphImplObserver(), and bpp::AssociationGraphImplObserver< N, E, TreeGraphImpl >::operator=().
|
private |
Can find an Edge index with the corresponding object.
Definition at line 103 of file AssociationGraphImplObserver.h.
Referenced by bpp::AssociationGraphImplObserver< N, E, TreeGraphImpl >::AssociationGraphImplObserver(), and bpp::AssociationGraphImplObserver< N, E, TreeGraphImpl >::operator=().
|
private |
List of edges, stored at the same ID than the corresponding edges in the observed graph.
Definition at line 63 of file AssociationGraphImplObserver.h.
Referenced by bpp::AssociationGraphImplObserver< N, E, TreeGraphImpl >::operator=().
|
private |
Registration with Graph Ids. List of nodes, stored at the same ID than the corresponding nodes in the observed graph.
Definition at line 57 of file AssociationGraphImplObserver.h.
Referenced by bpp::AssociationGraphImplObserver< N, E, TreeGraphImpl >::operator=().
|
private |
List of edges, stored at a given index.
Definition at line 93 of file AssociationGraphImplObserver.h.
Referenced by bpp::AssociationGraphImplObserver< N, E, TreeGraphImpl >::operator=().
|
private |
Registration with own Ids (named as index). List of nodes, stored at a given index.
Definition at line 88 of file AssociationGraphImplObserver.h.
Referenced by bpp::AssociationGraphImplObserver< N, E, TreeGraphImpl >::operator=().
|
private |
Can find a Node with the corresponding object.
Definition at line 68 of file AssociationGraphImplObserver.h.
Referenced by bpp::AssociationGraphImplObserver< N, E, TreeGraphImpl >::AssociationGraphImplObserver(), and bpp::AssociationGraphImplObserver< N, E, TreeGraphImpl >::operator=().
|
private |
Can find a Node index with the corresponding object.
Definition at line 98 of file AssociationGraphImplObserver.h.
Referenced by bpp::AssociationGraphImplObserver< N, E, TreeGraphImpl >::AssociationGraphImplObserver(), and bpp::AssociationGraphImplObserver< N, E, TreeGraphImpl >::operator=().
|
protected |
The observed Graph. Anytime this graph is observed, the current object will be warned to take changes into account.
Definition at line 44 of file AssociationGraphImplObserver.h.
Referenced by bpp::AssociationGraphImplObserver< N, E, TreeGraphImpl >::getGraph().