bpp-core3  3.0.0
bpp::AssociationGraphImplObserver< N, E, GraphImpl > Class Template Referenceabstract

#include <Bpp/Graph/AssociationGraphImplObserver.h>

+ Inheritance diagram for bpp::AssociationGraphImplObserver< N, E, GraphImpl >:
+ Collaboration diagram for bpp::AssociationGraphImplObserver< N, E, GraphImpl >:

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

Associate or dissociate N and E objects to pre-existing Graph Nodes and Graph Edges

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< NrefgetNodesFromGraphid (std::vector< NodeGraphid > nodes) const
 
Eref getEdgeFromGraphid (EdgeGraphid edge)
 
const Eref getEdgeFromGraphid (EdgeGraphid edge) const
 
std::vector< ErefgetEdgesFromGraphid (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< NodeIndexgetNodeIndexes (std::vector< Nref > nodes) const
 
EdgeIndex getEdgeIndex (const Eref edgeObject) const
 
std::vector< EdgeIndexgetEdgeIndexes (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 >::NodeIteratorallNodesIterator ()
 
std::unique_ptr< typename AssociationGraphObserver< N, E >::NodeIteratorallNodesIterator () const
 
std::unique_ptr< typename AssociationGraphObserver< N, E >::NodeIteratoroutgoingNeighborNodesIterator (Nref node)
 
std::unique_ptr< typename AssociationGraphObserver< N, E >::NodeIteratoroutgoingNeighborNodesIterator (Nref node) const
 
std::unique_ptr< typename AssociationGraphObserver< N, E >::NodeIteratorincomingNeighborNodesIterator (Nref node)
 
std::unique_ptr< typename AssociationGraphObserver< N, E >::NodeIteratorincomingNeighborNodesIterator (Nref node) const
 
std::vector< NrefgetNeighbors (const Nref node) const
 
std::vector< NodeIndexgetNeighbors (NodeIndex node) const
 
std::vector< ErefgetEdges (const Nref node) const
 
std::vector< EdgeIndexgetEdges (NodeIndex node) const
 
std::vector< NrefgetOutgoingNeighbors (const Nref node) const
 
std::vector< NodeIndexgetOutgoingNeighbors (NodeIndex node) const
 
std::vector< ErefgetOutgoingEdges (const Nref node) const
 
std::vector< EdgeIndexgetOutgoingEdges (NodeIndex node) const
 
std::vector< NrefgetIncomingNeighbors (const Nref node) const
 
std::vector< NodeIndexgetIncomingNeighbors (NodeIndex node) const
 
std::vector< ErefgetIncomingEdges (const Nref node) const
 
std::vector< EdgeIndexgetIncomingEdges (NodeIndex node) const
 
std::vector< NrefgetLeavesFromNode (Nref node, unsigned int maxDepth) const
 
std::vector< NrefgetAllLeaves () const
 
std::vector< NodeIndexgetAllLeavesIndexes () const
 
std::vector< NrefgetAllInnerNodes () const
 
std::vector< NodeIndexgetAllInnerNodesIndexes () const
 
std::vector< NrefgetAllNodes () const
 
std::vector< NodeIndexgetAllNodesIndexes () const
 
std::vector< EdgeIndexgetAllEdgesIndexes () const
 
std::unique_ptr< typename AssociationGraphObserver< N, E >::EdgeIteratorallEdgesIterator ()
 
std::unique_ptr< typename AssociationGraphObserver< N, E >::EdgeIteratorallEdgesIterator () const
 
std::unique_ptr< typename AssociationGraphObserver< N, E >::EdgeIteratoroutgoingEdgesIterator (Nref node)
 
std::unique_ptr< typename AssociationGraphObserver< N, E >::EdgeIteratoroutgoingEdgesIterator (Nref node) const
 
std::unique_ptr< typename AssociationGraphObserver< N, E >::EdgeIteratorincomingEdgesIterator (Nref node)
 
std::unique_ptr< typename AssociationGraphObserver< N, E >::EdgeIteratorincomingEdgesIterator (Nref node) const
 
std::vector< ErefgetAllEdges () const
 
bool isLeaf (const Nref node) const
 Is the node a leaf? More...
 
bool isLeaf (const NodeIndex nodeid) const
 
std::pair< Nref, NrefgetNodes (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< NodeIndexgetNodeIndexes (std::vector< std::shared_ptr< N >> nodeObjects) const =0
 
virtual std::vector< EdgeIndexgetEdgeIndexes (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< NrefgraphidToN_
 
std::vector< ErefgraphidToE_
 
std::map< Nref, NodeGraphidNToGraphid_
 
std::map< Eref, EdgeGraphidEToGraphid_
 
std::vector< NrefindexToN_
 
std::vector< ErefindexToE_
 
std::map< Nref, NodeIndexNToIndex_
 
std::map< Eref, EdgeIndexEToIndex_
 
 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< NrefgetNeighbors_ (const Nref nodeObject, neighborType type) const
 
std::vector< ErefgetEdges_ (const Nref nodeObject, neighborType type) const
 

General Info

General information about the graph

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
 

Detailed Description

template<class N, class E, class GraphImpl>
class bpp::AssociationGraphImplObserver< N, E, GraphImpl >

Definition at line 26 of file AssociationGraphImplObserver.h.

Member Typedef Documentation

◆ EdgeGraphid

template<class N, class E, class GraphImpl>
typedef Graph::EdgeId bpp::AssociationGraphImplObserver< N, E, GraphImpl >::EdgeGraphid

Definition at line 33 of file AssociationGraphImplObserver.h.

◆ EdgeIndex

template<class N, class E, class GraphImpl>
typedef AssociationGraphObserver<N, E>::EdgeIndex bpp::AssociationGraphImplObserver< N, E, GraphImpl >::EdgeIndex

Definition at line 30 of file AssociationGraphImplObserver.h.

◆ Eref

template<class N, class E, class GraphImpl>
using bpp::AssociationGraphImplObserver< N, E, GraphImpl >::Eref = std::shared_ptr<E>

Definition at line 35 of file AssociationGraphImplObserver.h.

◆ NodeGraphid

template<class N, class E, class GraphImpl>
typedef Graph::NodeId bpp::AssociationGraphImplObserver< N, E, GraphImpl >::NodeGraphid

Definition at line 32 of file AssociationGraphImplObserver.h.

◆ NodeIndex

template<class N, class E, class GraphImpl>
typedef AssociationGraphObserver<N, E>::NodeIndex bpp::AssociationGraphImplObserver< N, E, GraphImpl >::NodeIndex

Definition at line 29 of file AssociationGraphImplObserver.h.

◆ Nref

template<class N, class E, class GraphImpl>
using bpp::AssociationGraphImplObserver< N, E, GraphImpl >::Nref = std::shared_ptr<N>

Definition at line 36 of file AssociationGraphImplObserver.h.

Member Enumeration Documentation

◆ neighborType

template<class N, class E, class GraphImpl>
enum bpp::AssociationGraphImplObserver::neighborType
private

defines a type of neighbors : incoming and/or outgoing

Enumerator
INCOMING 
OUTGOING 
BOTH 

Definition at line 379 of file AssociationGraphImplObserver.h.

Constructor & Destructor Documentation

◆ AssociationGraphImplObserver() [1/4]

template<class N, class E, class GraphImpl>
bpp::AssociationGraphImplObserver< N, E, GraphImpl >::AssociationGraphImplObserver ( bool  directed = false)
inline

Constructor

Parameters
directedis the graph directed

Definition at line 115 of file AssociationGraphImplObserver.h.

◆ AssociationGraphImplObserver() [2/4]

template<class N, class E, class GraphImpl>
bpp::AssociationGraphImplObserver< N, E, GraphImpl >::AssociationGraphImplObserver ( std::shared_ptr< GraphImpl >  subjectGraph = 00)
inline

Constructor.

Parameters
subjectGraphthe graph which is observed. If == 00, a new Graph is built.

Definition at line 138 of file AssociationGraphImplObserver.h.

◆ AssociationGraphImplObserver() [3/4]

template<class N, class E, class GraphImpl>
template<class N2 , class E2 >
bpp::AssociationGraphImplObserver< N, E, GraphImpl >::AssociationGraphImplObserver ( AssociationGraphImplObserver< N2, E2, GraphImpl > const &  graphObserver)
inline

Copy Constructor

Parameters
graphObserverthe graphObserver to be copied

Definition at line 158 of file AssociationGraphImplObserver.h.

◆ AssociationGraphImplObserver() [4/4]

template<class N, class E, class GraphImpl>
bpp::AssociationGraphImplObserver< N, E, GraphImpl >::AssociationGraphImplObserver ( AssociationGraphImplObserver< N, E, GraphImpl > const &  graphObserver)
inline

Definition at line 204 of file AssociationGraphImplObserver.h.

◆ ~AssociationGraphImplObserver()

template<class N, class E, class GraphImpl>
bpp::AssociationGraphImplObserver< N, E, GraphImpl >::~AssociationGraphImplObserver ( )
inline

Destructor

Definition at line 305 of file AssociationGraphImplObserver.h.

Member Function Documentation

◆ addEdgeIndex()

template<class N, class E, class GraphImpl>
EdgeIndex bpp::AssociationGraphImplObserver< N, E, GraphImpl >::addEdgeIndex ( const Eref  edgeObject)
inline

Add an index associated to an edge

Parameters
edgeObjectobject to which one want to set the index
Returns
the given index

Definition at line 852 of file AssociationGraphImplObserver.h.

◆ addNodeIndex()

template<class N, class E, class GraphImpl>
NodeIndex bpp::AssociationGraphImplObserver< N, E, GraphImpl >::addNodeIndex ( const Nref  nodeObject)
inline

Set an new index associated to a node

Parameters
nodeObjectobject to which one want to set the index
Returns
the given index

Definition at line 821 of file AssociationGraphImplObserver.h.

◆ allEdgesIterator() [1/2]

template<class N, class E, class GraphImpl>
std::unique_ptr<typename AssociationGraphObserver<N, E>::EdgeIterator> bpp::AssociationGraphImplObserver< N, E, GraphImpl >::allEdgesIterator ( )
inlinevirtual

◆ allEdgesIterator() [2/2]

template<class N, class E, class GraphImpl>
std::unique_ptr<typename AssociationGraphObserver<N, E>::EdgeIterator> bpp::AssociationGraphImplObserver< N, E, GraphImpl >::allEdgesIterator ( ) const
inline

Definition at line 1368 of file AssociationGraphImplObserver.h.

◆ allNodesIterator() [1/2]

template<class N, class E, class GraphImpl>
std::unique_ptr<typename AssociationGraphObserver<N, E>::NodeIterator> bpp::AssociationGraphImplObserver< N, E, GraphImpl >::allNodesIterator ( )
inlinevirtual

◆ allNodesIterator() [2/2]

template<class N, class E, class GraphImpl>
std::unique_ptr<typename AssociationGraphObserver<N, E>::NodeIterator> bpp::AssociationGraphImplObserver< N, E, GraphImpl >::allNodesIterator ( ) const
inlinevirtual

◆ associateEdge()

template<class N, class E, class GraphImpl>
void bpp::AssociationGraphImplObserver< N, E, GraphImpl >::associateEdge ( Eref  edgeObject,
EdgeGraphid  graphEdge 
)
inlinevirtual

Associate a E object to an edge in the graph.

Parameters
edgeObjectobject to associate
graphEdgeexisting 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().

◆ associateNode()

template<class N, class E, class GraphImpl>
void bpp::AssociationGraphImplObserver< N, E, GraphImpl >::associateNode ( Nref  nodeObject,
NodeGraphid  graphNode 
)
inlinevirtual

Associate a N object to a node in the graph.

Parameters
nodeObjectobject to associate
graphNodeexisting 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().

◆ clone()

template<class N, class E, class GraphImpl>
AssociationGraphImplObserver<N, E, GraphImpl>* bpp::AssociationGraphImplObserver< N, E, GraphImpl >::clone ( ) const
inlinevirtual

clone function

Implements bpp::Clonable.

Definition at line 313 of file AssociationGraphImplObserver.h.

◆ copy() [1/5]

template<class N, class E>
template<class A , class B >
static B* bpp::AssociationGraphObserver< N, E >::copy ( const A &  a,
typename std::enable_if< !std::is_base_of< B, A >::value &&!std::is_abstract< B >::value, B *>::type *  = 0 
)
inlinestaticinherited

Specific copy of A and B objects, if clonable or not.

Definition at line 45 of file AssociationGraphObserver.h.

◆ copy() [2/5]

template<class N, class E>
template<class A , class B >
static B* bpp::AssociationGraphObserver< N, E >::copy ( const A &  a,
typename std::enable_if< !std::is_base_of< B, A >::value &&std::is_abstract< B >::value, B *>::type *  = 0 
)
inlinestaticinherited

Definition at line 51 of file AssociationGraphObserver.h.

◆ copy() [3/5]

template<class N, class E>
template<class A , class B >
static B* bpp::AssociationGraphObserver< N, E >::copy ( const A &  a,
typename std::enable_if< std::is_base_of< B, A >::value &&!std::is_abstract< A >::value, B *>::type *  = 0 
)
inlinestaticinherited

Definition at line 58 of file AssociationGraphObserver.h.

◆ copy() [4/5]

template<class N, class E>
template<class A , class B >
static B* bpp::AssociationGraphObserver< N, E >::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 
)
inlinestaticinherited

Definition at line 64 of file AssociationGraphObserver.h.

◆ copy() [5/5]

template<class N, class E>
template<class A , class B >
static B* bpp::AssociationGraphObserver< N, E >::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 
)
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().

◆ createNode() [1/2]

template<class N, class E, class GraphImpl>
void bpp::AssociationGraphImplObserver< N, E, GraphImpl >::createNode ( Nref  nodeObject)
inlinevirtual

Creates an orphaned node from a NodeClass object.

Parameters
nodeObjectthe 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().

◆ createNode() [2/2]

template<class N, class E, class GraphImpl>
void bpp::AssociationGraphImplObserver< N, E, GraphImpl >::createNode ( Nref  objectOriginNode,
Nref  newNodeObject,
Eref  newEdgeObject = 00 
)
inlinevirtual

Creates an node linked to an existing node. Order of parameters match the link method.

Parameters
objectOriginNodeexisting node. In a directed graph: origin -> newNode.
newNodeObjectthe N object associated to the node in the graph.
newEdgeObjectthe optional edge between the nodes (default = 00)

Implements bpp::AssociationGraphObserver< N, E >.

Definition at line 455 of file AssociationGraphImplObserver.h.

◆ deletedEdgesUpdate()

template<class N, class E, class GraphImpl>
void bpp::AssociationGraphImplObserver< N, E, GraphImpl >::deletedEdgesUpdate ( const std::vector< unsigned int > &  edgesToDelete)
inlinevirtual

Delete unused object edges, since they have been deleted in the graph

Parameters
edgesToDeletea vector of Edges to delete

Implements bpp::GraphObserver.

Definition at line 1477 of file AssociationGraphImplObserver.h.

◆ deletedNodesUpdate()

template<class N, class E, class GraphImpl>
void bpp::AssociationGraphImplObserver< N, E, GraphImpl >::deletedNodesUpdate ( const std::vector< unsigned int > &  nodesToDelete)
inlinevirtual

Delete unused object nodes, since they have been deleted in the graph

Parameters
nodesToDeletea vector of N to delete

Implements bpp::GraphObserver.

Definition at line 1495 of file AssociationGraphImplObserver.h.

◆ deleteNode()

template<class N, class E, class GraphImpl>
void bpp::AssociationGraphImplObserver< N, E, GraphImpl >::deleteNode ( Nref  nodeObject)
inlinevirtual

Deletes a node

Parameters
nodeObjectnode 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.

◆ dissociateEdge()

template<class N, class E, class GraphImpl>
void bpp::AssociationGraphImplObserver< N, E, GraphImpl >::dissociateEdge ( Eref  edgeObject)
inlinevirtual

◆ dissociateNode()

template<class N, class E, class GraphImpl>
void bpp::AssociationGraphImplObserver< N, E, GraphImpl >::dissociateNode ( Nref  nodeObject)
inlinevirtual

Dissociate a N or E object to a node or an edge in the graph.

Parameters
nodeObjectobject to dissociate

Implements bpp::AssociationGraphObserver< N, E >.

Definition at line 573 of file AssociationGraphImplObserver.h.

Referenced by bpp::AssociationGraphImplObserver< N, E, TreeGraphImpl >::deleteNode().

◆ edgeToString()

◆ getAllEdges()

template<class N, class E, class GraphImpl>
std::vector<Eref > bpp::AssociationGraphImplObserver< N, E, GraphImpl >::getAllEdges ( ) const
inlinevirtual

Get all the defined branches of a graph,

Returns
a vector containing the branchesObjects

Implements bpp::AssociationGraphObserver< N, E >.

Definition at line 1405 of file AssociationGraphImplObserver.h.

◆ getAllEdgesIndexes()

template<class N, class E, class GraphImpl>
std::vector<EdgeIndex> bpp::AssociationGraphImplObserver< N, E, GraphImpl >::getAllEdgesIndexes ( ) const
inlinevirtual

Get indexes of all defined edges of a graph,

Returns
a vector containing the edgesObjects

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.

◆ getAllInnerNodes()

template<class N, class E, class GraphImpl>
std::vector<Nref > bpp::AssociationGraphImplObserver< N, E, GraphImpl >::getAllInnerNodes ( ) const
inlinevirtual

Get all the inner nodes of a graph, ie, nodes with degree >= 2.

Returns
a vector containing the inner nodes.

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.

◆ getAllInnerNodesIndexes()

template<class N, class E, class GraphImpl>
std::vector<NodeIndex> bpp::AssociationGraphImplObserver< N, E, GraphImpl >::getAllInnerNodesIndexes ( ) const
inlinevirtual

Get the indexes of all inner nodes of a graph, ie, nodes with degree >= 2.

Returns
a vector containing the inner nodes.

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.

◆ getAllLeaves()

template<class N, class E, class GraphImpl>
std::vector<Nref > bpp::AssociationGraphImplObserver< N, E, GraphImpl >::getAllLeaves ( ) const
inlinevirtual

Get all the leaves objects of a graph, ie, nodes with only one neighbor,

Returns
a vector containing the leaves

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.

◆ getAllLeavesIndexes()

template<class N, class E, class GraphImpl>
std::vector<NodeIndex> bpp::AssociationGraphImplObserver< N, E, GraphImpl >::getAllLeavesIndexes ( ) const
inlinevirtual

Get index of the leaves objects of a graph, ie, nodes with only one neighbor,

Returns
a vector containing the leaves

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.

◆ getAllNodes()

template<class N, class E, class GraphImpl>
std::vector<Nref > bpp::AssociationGraphImplObserver< N, E, GraphImpl >::getAllNodes ( ) const
inlinevirtual

Get all the defined nodes of a graph,

Returns
a vector containing the nodesObjects

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().

◆ getAllNodesIndexes()

template<class N, class E, class GraphImpl>
std::vector<NodeIndex> bpp::AssociationGraphImplObserver< N, E, GraphImpl >::getAllNodesIndexes ( ) const
inlinevirtual

Get indexes of all defined nodes of a graph,

Returns
a vector containing the nodesObjects

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.

◆ getDegree()

template<class N, class E, class GraphImpl>
size_t bpp::AssociationGraphImplObserver< N, E, GraphImpl >::getDegree ( const Nref  node) const
inline

Return the number of neighbors of a node

Parameters
nodethe concerned node
Returns
the number of neighbors

Definition at line 1559 of file AssociationGraphImplObserver.h.

◆ getEdge()

template<class N, class E, class GraphImpl>
Eref bpp::AssociationGraphImplObserver< N, E, GraphImpl >::getEdge ( EdgeIndex  edge) const
inlinevirtual

Return the associated Node index

Parameters
edgeobject which to return the node index
Returns
a 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().

◆ getEdgeFromGraphid() [1/2]

◆ getEdgeFromGraphid() [2/2]

template<class N, class E, class GraphImpl>
const Eref bpp::AssociationGraphImplObserver< N, E, GraphImpl >::getEdgeFromGraphid ( EdgeGraphid  edge) const
inlinevirtual

◆ getEdgeGraphid()

template<class N, class E, class GraphImpl>
EdgeGraphid bpp::AssociationGraphImplObserver< N, E, GraphImpl >::getEdgeGraphid ( const Eref  edgeObject) const
inlinevirtual

Return the associated Edge ID

Parameters
edgeObjectobject which to return the node ID
Returns
a edge ID

Implements bpp::AssociationGraphObserver< N, E >.

Definition at line 608 of file AssociationGraphImplObserver.h.

Referenced by bpp::AssociationGraphImplObserver< N, E, TreeGraphImpl >::getNodes().

◆ getEdgeIndex()

template<class N, class E, class GraphImpl>
EdgeIndex bpp::AssociationGraphImplObserver< N, E, GraphImpl >::getEdgeIndex ( const Eref  edgeObject) const
inlinevirtual

◆ getEdgeIndexes() [1/2]

template<class N, class E>
virtual std::vector<EdgeIndex> bpp::AssociationGraphObserver< N, E >::getEdgeIndexes ( std::vector< std::shared_ptr< E >>  edgeObjects) const
pure virtualinherited

◆ getEdgeIndexes() [2/2]

◆ getEdgeLinking()

template<class N, class E, class GraphImpl>
Eref bpp::AssociationGraphImplObserver< N, E, GraphImpl >::getEdgeLinking ( Nref  nodeA,
Nref  nodeB 
) const
inlinevirtual

Returns the Edge between two nodes nodeA -> nodeB

Parameters
nodeAsource node (if directed)
nodeBdestination node (if directed)
Returns
the edge between these two nodes, or 0 if edge does not exist

Implements bpp::AssociationGraphObserver< N, E >.

Definition at line 1449 of file AssociationGraphImplObserver.h.

Referenced by bpp::AssociationGraphImplObserver< N, E, TreeGraphImpl >::outputToDot().

◆ getEdges() [1/2]

template<class N, class E, class GraphImpl>
std::vector<Eref > bpp::AssociationGraphImplObserver< N, E, GraphImpl >::getEdges ( const Nref  node) const
inlinevirtual

Get all the edges of a node in the graph.

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

Implements bpp::AssociationGraphObserver< N, E >.

Definition at line 1096 of file AssociationGraphImplObserver.h.

Referenced by bpp::AssociationGraphImplObserver< N, E, TreeGraphImpl >::getEdges().

◆ getEdges() [2/2]

template<class N, class E, class GraphImpl>
std::vector<EdgeIndex> bpp::AssociationGraphImplObserver< N, E, GraphImpl >::getEdges ( NodeIndex  node) const
inlinevirtual

◆ getEdges_()

template<class N, class E, class GraphImpl>
std::vector<Eref > bpp::AssociationGraphImplObserver< N, E, GraphImpl >::getEdges_ ( const Nref  nodeObject,
neighborType  type 
) const
inlineprivate

Get incoming / outgoing edges according to the enum type

Definition at line 407 of file AssociationGraphImplObserver.h.

◆ getEdgesFromGraphid()

◆ getGraph() [1/2]

template<class N, class E, class GraphImpl>
const std::shared_ptr<GraphImpl> bpp::AssociationGraphImplObserver< N, E, GraphImpl >::getGraph ( ) const
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().

◆ getGraph() [2/2]

template<class N, class E, class GraphImpl>
std::shared_ptr<GraphImpl> bpp::AssociationGraphImplObserver< N, E, GraphImpl >::getGraph ( )
inline

Definition at line 320 of file AssociationGraphImplObserver.h.

◆ getIncomingEdges() [1/2]

template<class N, class E, class GraphImpl>
std::vector<Eref > bpp::AssociationGraphImplObserver< N, E, GraphImpl >::getIncomingEdges ( const Nref  node) const
inlinevirtual

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

Implements bpp::AssociationGraphObserver< N, E >.

Definition at line 1162 of file AssociationGraphImplObserver.h.

Referenced by bpp::AssociationGraphImplObserver< N, E, TreeGraphImpl >::getIncomingEdges().

◆ getIncomingEdges() [2/2]

template<class N, class E, class GraphImpl>
std::vector<EdgeIndex> bpp::AssociationGraphImplObserver< N, E, GraphImpl >::getIncomingEdges ( NodeIndex  node) const
inlinevirtual

◆ getIncomingNeighbors() [1/2]

template<class N, class E, class GraphImpl>
std::vector<Nref > bpp::AssociationGraphImplObserver< N, E, GraphImpl >::getIncomingNeighbors ( const Nref  node) const
inlinevirtual

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

Implements bpp::AssociationGraphObserver< N, E >.

Definition at line 1145 of file AssociationGraphImplObserver.h.

Referenced by bpp::AssociationGraphImplObserver< N, E, TreeGraphImpl >::getIncomingNeighbors().

◆ getIncomingNeighbors() [2/2]

template<class N, class E, class GraphImpl>
std::vector<NodeIndex> bpp::AssociationGraphImplObserver< N, E, GraphImpl >::getIncomingNeighbors ( NodeIndex  node) const
inlinevirtual

◆ getLeavesFromNode()

template<class N, class E, class GraphImpl>
std::vector<Nref > bpp::AssociationGraphImplObserver< N, E, GraphImpl >::getLeavesFromNode ( Nref  node,
unsigned int  maxDepth 
) const
inlinevirtual

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

Parameters
nodethe starting node
maxDepththe max recursion depth
Returns
a vector containing the leaves

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().

◆ getNeighbors() [1/2]

template<class N, class E, class GraphImpl>
std::vector<Nref > bpp::AssociationGraphImplObserver< N, E, GraphImpl >::getNeighbors ( const Nref  node) const
inlinevirtual

Get all the neighbors of a node in the graph.

Parameters
nodethe node one wants to get its neighbors
Returns
a vector containing the 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().

◆ getNeighbors() [2/2]

template<class N, class E, class GraphImpl>
std::vector<NodeIndex> bpp::AssociationGraphImplObserver< N, E, GraphImpl >::getNeighbors ( NodeIndex  node) const
inlinevirtual

Get the index of all neighbors of a node in the graph.

Parameters
nodethe node one wants to get its neighbors
Returns
a vector containing the 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.

◆ getNeighbors_()

template<class N, class E, class GraphImpl>
std::vector<Nref > bpp::AssociationGraphImplObserver< N, E, GraphImpl >::getNeighbors_ ( const Nref  nodeObject,
neighborType  type 
) const
inlineprivate

Get incoming / outgoing neighbors according to the enum type

Definition at line 384 of file AssociationGraphImplObserver.h.

◆ getNode()

◆ getNodeFromGraphid() [1/2]

◆ getNodeFromGraphid() [2/2]

template<class N, class E, class GraphImpl>
const Nref bpp::AssociationGraphImplObserver< N, E, GraphImpl >::getNodeFromGraphid ( NodeGraphid  ) const
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.

◆ getNodeGraphid()

template<class N, class E, class GraphImpl>
NodeGraphid bpp::AssociationGraphImplObserver< N, E, GraphImpl >::getNodeGraphid ( const Nref  nodeObject) const
inlinevirtual

◆ getNodeIndex()

◆ getNodeIndexes() [1/2]

template<class N, class E>
virtual std::vector<NodeIndex> bpp::AssociationGraphObserver< N, E >::getNodeIndexes ( std::vector< std::shared_ptr< N >>  nodeObjects) const
pure virtualinherited

◆ getNodeIndexes() [2/2]

◆ getNodes()

template<class N, class E, class GraphImpl>
std::pair<Nref, Nref> bpp::AssociationGraphImplObserver< N, E, GraphImpl >::getNodes ( Eref  edge) const
inline

Get nodes located at the extremities of an edge

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

Definition at line 1437 of file AssociationGraphImplObserver.h.

Referenced by bpp::AssociationGraphImplObserver< N, E, TreeGraphImpl >::link().

◆ getNodesFromGraphid()

◆ getNumberOfEdges()

template<class N, class E, class GraphImpl>
size_t bpp::AssociationGraphImplObserver< N, E, GraphImpl >::getNumberOfEdges ( ) const
inline

Return the number of defined edges, ie edges that have a corresponding object in this GraphObserver

Returns
the number of edges

Definition at line 1531 of file AssociationGraphImplObserver.h.

◆ getNumberOfLeaves()

template<class N, class E, class GraphImpl>
size_t bpp::AssociationGraphImplObserver< N, E, GraphImpl >::getNumberOfLeaves ( ) const
inline

Return the number of defined leaves, ie leaves that have a corresponding object in this GraphObserver

Returns
the number of leaves

Definition at line 1542 of file AssociationGraphImplObserver.h.

◆ getNumberOfNodes()

template<class N, class E, class GraphImpl>
size_t bpp::AssociationGraphImplObserver< N, E, GraphImpl >::getNumberOfNodes ( ) const
inline

Return the number of defined nodes, ie nodes that have a corresponding object in this GraphObserver

Returns
the number of nodes

Definition at line 1521 of file AssociationGraphImplObserver.h.

◆ getOutgoingEdges() [1/2]

template<class N, class E, class GraphImpl>
std::vector<Eref > bpp::AssociationGraphImplObserver< N, E, GraphImpl >::getOutgoingEdges ( const Nref  node) const
inlinevirtual

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 outgoing edges

Implements bpp::AssociationGraphObserver< N, E >.

Definition at line 1129 of file AssociationGraphImplObserver.h.

Referenced by bpp::AssociationGraphImplObserver< N, E, TreeGraphImpl >::getOutgoingEdges().

◆ getOutgoingEdges() [2/2]

template<class N, class E, class GraphImpl>
std::vector<EdgeIndex> bpp::AssociationGraphImplObserver< N, E, GraphImpl >::getOutgoingEdges ( NodeIndex  node) const
inlinevirtual

◆ getOutgoingNeighbors() [1/2]

template<class N, class E, class GraphImpl>
std::vector<Nref > bpp::AssociationGraphImplObserver< N, E, GraphImpl >::getOutgoingNeighbors ( const Nref  node) const
inlinevirtual

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 outgoing 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().

◆ getOutgoingNeighbors() [2/2]

template<class N, class E, class GraphImpl>
std::vector<NodeIndex> bpp::AssociationGraphImplObserver< N, E, GraphImpl >::getOutgoingNeighbors ( NodeIndex  node) const
inlinevirtual

◆ getRoot()

template<class N, class E, class GraphImpl>
Nref bpp::AssociationGraphImplObserver< N, E, GraphImpl >::getRoot ( ) const
inlinevirtual

◆ getRootIndex()

template<class N, class E, class GraphImpl>
NodeIndex bpp::AssociationGraphImplObserver< N, E, GraphImpl >::getRootIndex ( ) const
inlinevirtual

◆ hasEdge() [1/2]

◆ hasEdge() [2/2]

template<class N, class E, class GraphImpl>
bool bpp::AssociationGraphImplObserver< N, E, GraphImpl >::hasEdge ( EdgeIndex  edge) const
inlinevirtual

Return if has Edge matching EdgeIndex

Parameters
edgeEdgeIndex index

Implements bpp::AssociationGraphObserver< N, E >.

Definition at line 891 of file AssociationGraphImplObserver.h.

◆ hasEdgeIndex()

template<class N, class E, class GraphImpl>
bool bpp::AssociationGraphImplObserver< N, E, GraphImpl >::hasEdgeIndex ( const Eref  edgeObject) const
inlinevirtual

◆ hasNode() [1/2]

◆ hasNode() [2/2]

template<class N, class E, class GraphImpl>
bool bpp::AssociationGraphImplObserver< N, E, GraphImpl >::hasNode ( NodeIndex  node) const
inlinevirtual

Return if has Node matching NodeIndex

Parameters
nodeNodeIndex index

Implements bpp::AssociationGraphObserver< N, E >.

Definition at line 882 of file AssociationGraphImplObserver.h.

◆ hasNodeIndex()

template<class N, class E, class GraphImpl>
bool bpp::AssociationGraphImplObserver< N, E, GraphImpl >::hasNodeIndex ( const Nref  nodeObject) const
inlinevirtual

◆ incomingEdgesIterator() [1/2]

template<class N, class E, class GraphImpl>
std::unique_ptr<typename AssociationGraphObserver<N, E>::EdgeIterator> bpp::AssociationGraphImplObserver< N, E, GraphImpl >::incomingEdgesIterator ( Nref  node)
inlinevirtual

◆ incomingEdgesIterator() [2/2]

template<class N, class E, class GraphImpl>
std::unique_ptr<typename AssociationGraphObserver<N, E>::EdgeIterator> bpp::AssociationGraphImplObserver< N, E, GraphImpl >::incomingEdgesIterator ( Nref  node) const
inline

Definition at line 1396 of file AssociationGraphImplObserver.h.

◆ incomingNeighborNodesIterator() [1/2]

template<class N, class E, class GraphImpl>
std::unique_ptr<typename AssociationGraphObserver<N, E>::NodeIterator> bpp::AssociationGraphImplObserver< N, E, GraphImpl >::incomingNeighborNodesIterator ( Nref  node)
inlinevirtual

◆ incomingNeighborNodesIterator() [2/2]

template<class N, class E, class GraphImpl>
std::unique_ptr<typename AssociationGraphObserver<N, E>::NodeIterator> bpp::AssociationGraphImplObserver< N, E, GraphImpl >::incomingNeighborNodesIterator ( Nref  node) const
inlinevirtual

◆ isLeaf() [1/2]

template<class N, class E, class GraphImpl>
bool bpp::AssociationGraphImplObserver< N, E, GraphImpl >::isLeaf ( const Nref  node) const
inline

◆ isLeaf() [2/2]

template<class N, class E, class GraphImpl>
bool bpp::AssociationGraphImplObserver< N, E, GraphImpl >::isLeaf ( const NodeIndex  nodeid) const
inline

Definition at line 1426 of file AssociationGraphImplObserver.h.

◆ link()

template<class N, class E, class GraphImpl>
void bpp::AssociationGraphImplObserver< N, E, GraphImpl >::link ( Nref  nodeObjectA,
Nref  nodeObjectB,
Eref  edgeObject = 00 
)
inlinevirtual

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

Parameters
nodeObjectAsource node (or first node if undirected)
nodeObjectBtarget node (or second node if undirected)
edgeObjectthe 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().

◆ nodeToString()

◆ operator=()

template<class N, class E, class GraphImpl>
AssociationGraphImplObserver<N, E, GraphImpl>& bpp::AssociationGraphImplObserver< N, E, GraphImpl >::operator= ( bpp::AssociationGraphImplObserver< N, E, GraphImpl > const &  graphObserver)
inline

= Operator

Parameters
graphObserverthe 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=().

◆ outgoingEdgesIterator() [1/2]

template<class N, class E, class GraphImpl>
std::unique_ptr<typename AssociationGraphObserver<N, E>::EdgeIterator> bpp::AssociationGraphImplObserver< N, E, GraphImpl >::outgoingEdgesIterator ( Nref  node)
inlinevirtual

◆ outgoingEdgesIterator() [2/2]

template<class N, class E, class GraphImpl>
std::unique_ptr<typename AssociationGraphObserver<N, E>::EdgeIterator> bpp::AssociationGraphImplObserver< N, E, GraphImpl >::outgoingEdgesIterator ( Nref  node) const
inline

Definition at line 1382 of file AssociationGraphImplObserver.h.

◆ outgoingNeighborNodesIterator() [1/2]

template<class N, class E, class GraphImpl>
std::unique_ptr<typename AssociationGraphObserver<N, E>::NodeIterator> bpp::AssociationGraphImplObserver< N, E, GraphImpl >::outgoingNeighborNodesIterator ( Nref  node)
inlinevirtual

◆ outgoingNeighborNodesIterator() [2/2]

template<class N, class E, class GraphImpl>
std::unique_ptr<typename AssociationGraphObserver<N, E>::NodeIterator> bpp::AssociationGraphImplObserver< N, E, GraphImpl >::outgoingNeighborNodesIterator ( Nref  node) const
inlinevirtual

◆ outputToDot() [1/2]

template<class N, class E, class GraphImpl>
void bpp::AssociationGraphImplObserver< N, E, GraphImpl >::outputToDot ( const std::string &  fname,
const std::string &  name 
) const
inline

◆ outputToDot() [2/2]

template<class N, class E, class GraphImpl>
void bpp::AssociationGraphImplObserver< N, E, GraphImpl >::outputToDot ( std::ostream &  out,
const std::string &  name 
) const
inline

Definition at line 943 of file AssociationGraphImplObserver.h.

◆ setEdgeIndex()

template<class N, class E, class GraphImpl>
EdgeIndex bpp::AssociationGraphImplObserver< N, E, GraphImpl >::setEdgeIndex ( const Eref  edgeObject,
EdgeIndex  index 
)
inlinevirtual

Set an index associated to an edge

Parameters
edgeObjectobject to which one want to set the index
indexintex to be given, 0 to get the first free index
Returns
the given index

Implements bpp::AssociationGraphObserver< N, E >.

Definition at line 798 of file AssociationGraphImplObserver.h.

◆ setEdgeLinking()

template<class N, class E, class GraphImpl>
void bpp::AssociationGraphImplObserver< N, E, GraphImpl >::setEdgeLinking ( Nref  nodeA,
Nref  nodeB,
Eref  edge 
)
inlinevirtual

Sets the Edge between two nodes nodeA -> nodeB

Parameters
nodeAsource node (if directed)
nodeBdestination node (if directed)
edgethe edge between these two nodes

Implements bpp::AssociationGraphObserver< N, E >.

Definition at line 1460 of file AssociationGraphImplObserver.h.

◆ setNodeIndex()

template<class N, class E, class GraphImpl>
NodeIndex bpp::AssociationGraphImplObserver< N, E, GraphImpl >::setNodeIndex ( const Nref  nodeObject,
NodeIndex  index 
)
inlinevirtual

Set an index associated to a node

Parameters
nodeObjectobject to which one want to set the index
indexindex to be given
Returns
the given index

Implements bpp::AssociationGraphObserver< N, E >.

Definition at line 774 of file AssociationGraphImplObserver.h.

◆ setRoot()

template<class N, class E, class GraphImpl>
void bpp::AssociationGraphImplObserver< N, E, GraphImpl >::setRoot ( const Nref  newRoot)
inline

set the root (but no checking, to be used at first construction)

Definition at line 684 of file AssociationGraphImplObserver.h.

◆ unlink()

template<class N, class E, class GraphImpl>
void bpp::AssociationGraphImplObserver< N, E, GraphImpl >::unlink ( Nref  nodeObjectA,
Nref  nodeObjectB 
)
inlinevirtual

Deletes the link between two existing nodes in the graph.

Implements bpp::AssociationGraphObserver< N, E >.

Definition at line 497 of file AssociationGraphImplObserver.h.

Friends And Related Function Documentation

◆ AssociationGraphImplObserver

template<class N, class E, class GraphImpl>
template<typename N2 , typename E2 , typename G2 >
friend class AssociationGraphImplObserver
friend

Definition at line 1566 of file AssociationGraphImplObserver.h.

Member Data Documentation

◆ EToGraphid_

template<class N, class E, class GraphImpl>
std::map<Eref, EdgeGraphid> bpp::AssociationGraphImplObserver< N, E, GraphImpl >::EToGraphid_
private

◆ EToIndex_

template<class N, class E, class GraphImpl>
std::map<Eref, EdgeIndex> bpp::AssociationGraphImplObserver< N, E, GraphImpl >::EToIndex_
private

◆ graphidToE_

template<class N, class E, class GraphImpl>
std::vector<Eref > bpp::AssociationGraphImplObserver< N, E, GraphImpl >::graphidToE_
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=().

◆ graphidToN_

template<class N, class E, class GraphImpl>
std::vector<Nref > bpp::AssociationGraphImplObserver< N, E, GraphImpl >::graphidToN_
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=().

◆ indexToE_

template<class N, class E, class GraphImpl>
std::vector<Eref > bpp::AssociationGraphImplObserver< N, E, GraphImpl >::indexToE_
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=().

◆ indexToN_

template<class N, class E, class GraphImpl>
std::vector<Nref > bpp::AssociationGraphImplObserver< N, E, GraphImpl >::indexToN_
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=().

◆ NToGraphid_

template<class N, class E, class GraphImpl>
std::map<Nref, NodeGraphid> bpp::AssociationGraphImplObserver< N, E, GraphImpl >::NToGraphid_
private

◆ NToIndex_

template<class N, class E, class GraphImpl>
std::map<Nref, NodeIndex> bpp::AssociationGraphImplObserver< N, E, GraphImpl >::NToIndex_
private

◆ subjectGraph_

template<class N, class E, class GraphImpl>
std::shared_ptr<GraphImpl> bpp::AssociationGraphImplObserver< N, E, GraphImpl >::subjectGraph_
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().


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