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

#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)
 

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 62 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 69 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 66 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 71 of file AssociationGraphImplObserver.h.

◆ NodeGraphid

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

Definition at line 68 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 65 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 72 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 415 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 151 of file AssociationGraphImplObserver.h.

References bpp::AssociationGraphImplObserver< N, E, GraphImpl >::getGraph().

◆ 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 174 of file AssociationGraphImplObserver.h.

References bpp::AssociationGraphImplObserver< N, E, GraphImpl >::getGraph().

◆ AssociationGraphImplObserver() [3/4]

◆ AssociationGraphImplObserver() [4/4]

◆ ~AssociationGraphImplObserver()

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

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 888 of file AssociationGraphImplObserver.h.

References bpp::AssociationGraphImplObserver< N, E, GraphImpl >::edgeToString(), bpp::AssociationGraphImplObserver< N, E, GraphImpl >::EToIndex_, and bpp::AssociationGraphImplObserver< N, E, GraphImpl >::indexToE_.

◆ 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 857 of file AssociationGraphImplObserver.h.

References bpp::AssociationGraphImplObserver< N, E, GraphImpl >::indexToN_, bpp::AssociationGraphImplObserver< N, E, GraphImpl >::nodeToString(), and bpp::AssociationGraphImplObserver< N, E, GraphImpl >::NToIndex_.

◆ 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 1404 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

◆ associateNode()

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

◆ 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 349 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 82 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 88 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 95 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 107 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 101 of file AssociationGraphObserver.h.

◆ createNode() [1/2]

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

◆ 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 491 of file AssociationGraphImplObserver.h.

References bpp::AssociationGraphImplObserver< N, E, GraphImpl >::createNode(), and bpp::AssociationGraphImplObserver< N, E, GraphImpl >::link().

◆ 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 1513 of file AssociationGraphImplObserver.h.

References bpp::AssociationGraphImplObserver< N, E, GraphImpl >::EToGraphid_, and bpp::AssociationGraphImplObserver< N, E, GraphImpl >::graphidToE_.

◆ 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 1531 of file AssociationGraphImplObserver.h.

References bpp::AssociationGraphImplObserver< N, E, GraphImpl >::graphidToN_, and bpp::AssociationGraphImplObserver< N, E, GraphImpl >::NToGraphid_.

◆ deleteNode()

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

◆ 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 609 of file AssociationGraphImplObserver.h.

References bpp::AssociationGraphImplObserver< N, E, GraphImpl >::graphidToN_, and bpp::AssociationGraphImplObserver< N, E, GraphImpl >::NToGraphid_.

Referenced by bpp::AssociationGraphImplObserver< N, E, GraphImpl >::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 1441 of file AssociationGraphImplObserver.h.

References bpp::AssociationGraphImplObserver< N, E, GraphImpl >::graphidToE_.

◆ 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 1352 of file AssociationGraphImplObserver.h.

References bpp::AssociationGraphImplObserver< N, E, GraphImpl >::getEdgeIndex(), and bpp::AssociationGraphImplObserver< N, E, GraphImpl >::graphidToE_.

◆ 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 1272 of file AssociationGraphImplObserver.h.

References bpp::AssociationGraphImplObserver< N, E, GraphImpl >::getGraph(), and bpp::AssociationGraphImplObserver< N, E, GraphImpl >::graphidToN_.

◆ 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 1293 of file AssociationGraphImplObserver.h.

References bpp::AssociationGraphImplObserver< N, E, GraphImpl >::getGraph(), bpp::AssociationGraphImplObserver< N, E, GraphImpl >::getNodeIndex(), and bpp::AssociationGraphImplObserver< N, E, GraphImpl >::graphidToN_.

◆ 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 1229 of file AssociationGraphImplObserver.h.

References bpp::AssociationGraphImplObserver< N, E, GraphImpl >::getGraph(), and bpp::AssociationGraphImplObserver< N, E, GraphImpl >::graphidToN_.

◆ 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 1250 of file AssociationGraphImplObserver.h.

References bpp::AssociationGraphImplObserver< N, E, GraphImpl >::getGraph(), bpp::AssociationGraphImplObserver< N, E, GraphImpl >::getNodeIndex(), and bpp::AssociationGraphImplObserver< N, E, GraphImpl >::graphidToN_.

◆ 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 1314 of file AssociationGraphImplObserver.h.

References bpp::AssociationGraphImplObserver< N, E, GraphImpl >::graphidToN_.

Referenced by bpp::AssociationGraphImplObserver< N, E, GraphImpl >::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 1333 of file AssociationGraphImplObserver.h.

References bpp::AssociationGraphImplObserver< N, E, GraphImpl >::getNodeIndex(), and bpp::AssociationGraphImplObserver< N, E, GraphImpl >::graphidToN_.

◆ 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 1595 of file AssociationGraphImplObserver.h.

References bpp::AssociationGraphImplObserver< N, E, GraphImpl >::getGraph(), and bpp::AssociationGraphImplObserver< N, E, GraphImpl >::getNodeGraphid().

◆ 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 947 of file AssociationGraphImplObserver.h.

References bpp::AssociationGraphImplObserver< N, E, GraphImpl >::indexToE_.

Referenced by bpp::AssociationGraphImplObserver< N, E, GraphImpl >::getEdgeLinking(), and bpp::AssociationGraphImplObserver< N, E, GraphImpl >::setEdgeLinking().

◆ getEdgeFromGraphid() [1/2]

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

◆ 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 644 of file AssociationGraphImplObserver.h.

References bpp::AssociationGraphImplObserver< N, E, GraphImpl >::EToGraphid_, and bpp::TextTools::toString().

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

◆ getEdgeIndex()

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

◆ getEdgeIndexes()

◆ 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 1485 of file AssociationGraphImplObserver.h.

References bpp::AssociationGraphImplObserver< N, E, GraphImpl >::getEdge(), bpp::AssociationGraphImplObserver< N, E, GraphImpl >::getEdgeFromGraphid(), bpp::AssociationGraphImplObserver< N, E, GraphImpl >::getGraph(), and bpp::AssociationGraphImplObserver< N, E, GraphImpl >::getNodeGraphid().

Referenced by bpp::AssociationGraphImplObserver< N, E, GraphImpl >::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

◆ getEdges() [2/2]

◆ getEdges_()

◆ getEdgesFromGraphid()

◆ getGraph() [1/2]

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

◆ getGraph() [2/2]

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

Definition at line 351 of file AssociationGraphImplObserver.h.

References bpp::AssociationGraphImplObserver< N, E, GraphImpl >::subjectGraph_.

Referenced by bpp::AssociationGraphImplObserver< N, E, GraphImpl >::AssociationGraphImplObserver(), bpp::AssociationGraphImplObserver< N, E, GraphImpl >::createNode(), bpp::AssociationGraphImplObserver< N, E, GraphImpl >::deleteNode(), bpp::AssociationGraphImplObserver< N, E, GraphImpl >::getAllInnerNodes(), bpp::AssociationGraphImplObserver< N, E, GraphImpl >::getAllInnerNodesIndexes(), bpp::AssociationGraphImplObserver< N, E, GraphImpl >::getAllLeaves(), bpp::AssociationGraphImplObserver< N, E, GraphImpl >::getAllLeavesIndexes(), bpp::AssociationGraphImplObserver< N, E, GraphImpl >::getDegree(), bpp::AssociationGraphImplObserver< N, E, GraphImpl >::getEdgeLinking(), bpp::AssociationGraphImplObserver< N, E, GraphImpl >::getEdges(), bpp::AssociationGraphImplObserver< N, E, GraphImpl >::getEdges_(), bpp::AssociationGraphImplObserver< N, E, GraphImpl >::getIncomingEdges(), bpp::AssociationGraphImplObserver< N, E, GraphImpl >::getIncomingNeighbors(), bpp::AssociationGraphImplObserver< N, E, GraphImpl >::getLeavesFromNode(), bpp::AssociationGraphImplObserver< N, E, GraphImpl >::getNeighbors(), bpp::AssociationGraphImplObserver< N, E, GraphImpl >::getNeighbors_(), bpp::AssociationGraphImplObserver< N, E, GraphImpl >::getNodes(), bpp::AssociationGraphImplObserver< N, E, GraphImpl >::getOutgoingEdges(), bpp::AssociationGraphImplObserver< N, E, GraphImpl >::getOutgoingNeighbors(), bpp::AssociationGraphImplObserver< N, E, GraphImpl >::getRoot(), bpp::AssociationGraphImplObserver< N, E, GraphImpl >::getRootIndex(), bpp::AssociationGraphImplObserver< N, E, GraphImpl >::isLeaf(), bpp::AssociationGraphImplObserver< N, E, GraphImpl >::link(), bpp::AssociationGraphImplObserver< N, E, GraphImpl >::operator=(), bpp::AssociationGraphImplObserver< N, E, GraphImpl >::outputToDot(), bpp::AssociationGraphImplObserver< N, E, GraphImpl >::setEdgeLinking(), bpp::AssociationGraphImplObserver< N, E, GraphImpl >::setRoot(), bpp::AssociationGraphImplObserver< N, E, GraphImpl >::unlink(), and bpp::AssociationGraphImplObserver< N, E, GraphImpl >::~AssociationGraphImplObserver().

◆ 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 1198 of file AssociationGraphImplObserver.h.

References bpp::AssociationGraphImplObserver< N, E, GraphImpl >::getEdgesFromGraphid(), bpp::AssociationGraphImplObserver< N, E, GraphImpl >::getGraph(), and bpp::AssociationGraphImplObserver< N, E, GraphImpl >::getNodeGraphid().

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

◆ getIncomingEdges() [2/2]

◆ 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 1181 of file AssociationGraphImplObserver.h.

References bpp::AssociationGraphImplObserver< N, E, GraphImpl >::getGraph(), bpp::AssociationGraphImplObserver< N, E, GraphImpl >::getNodeGraphid(), and bpp::AssociationGraphImplObserver< N, E, GraphImpl >::getNodesFromGraphid().

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

◆ getIncomingNeighbors() [2/2]

◆ 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 1218 of file AssociationGraphImplObserver.h.

References bpp::AssociationGraphImplObserver< N, E, GraphImpl >::getGraph(), bpp::AssociationGraphImplObserver< N, E, GraphImpl >::getNodeGraphid(), and bpp::AssociationGraphImplObserver< N, E, GraphImpl >::getNodesFromGraphid().

◆ 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 1109 of file AssociationGraphImplObserver.h.

References bpp::AssociationGraphImplObserver< N, E, GraphImpl >::getGraph(), bpp::AssociationGraphImplObserver< N, E, GraphImpl >::getNodeGraphid(), and bpp::AssociationGraphImplObserver< N, E, GraphImpl >::getNodesFromGraphid().

Referenced by bpp::AssociationGraphImplObserver< N, E, GraphImpl >::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 1121 of file AssociationGraphImplObserver.h.

References bpp::AssociationGraphImplObserver< N, E, GraphImpl >::getNeighbors(), bpp::AssociationGraphImplObserver< N, E, GraphImpl >::getNode(), and bpp::AssociationGraphImplObserver< N, E, GraphImpl >::getNodeIndexes().

◆ getNeighbors_()

◆ getNode()

◆ getNodeFromGraphid() [1/2]

template<class N , class E , class GraphImpl >
Nref bpp::AssociationGraphImplObserver< N, E, GraphImpl >::getNodeFromGraphid ( NodeGraphid  node)
inlinevirtual

◆ 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 663 of file AssociationGraphImplObserver.h.

References bpp::AssociationGraphImplObserver< N, E, GraphImpl >::graphidToN_.

◆ getNodeGraphid()

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

◆ getNodeIndex()

◆ getNodeIndexes()

◆ 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 1473 of file AssociationGraphImplObserver.h.

References bpp::AssociationGraphImplObserver< N, E, GraphImpl >::getEdgeGraphid(), bpp::AssociationGraphImplObserver< N, E, GraphImpl >::getGraph(), and bpp::AssociationGraphImplObserver< N, E, GraphImpl >::getNodeFromGraphid().

Referenced by bpp::AssociationGraphImplObserver< N, E, GraphImpl >::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 1567 of file AssociationGraphImplObserver.h.

References bpp::AssociationGraphImplObserver< N, E, GraphImpl >::EToGraphid_.

◆ 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 1578 of file AssociationGraphImplObserver.h.

References bpp::AssociationGraphImplObserver< N, E, GraphImpl >::graphidToN_, and bpp::AssociationGraphImplObserver< N, E, GraphImpl >::isLeaf().

◆ 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 1557 of file AssociationGraphImplObserver.h.

References bpp::AssociationGraphImplObserver< N, E, GraphImpl >::NToGraphid_.

◆ 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 1165 of file AssociationGraphImplObserver.h.

References bpp::AssociationGraphImplObserver< N, E, GraphImpl >::getEdgesFromGraphid(), bpp::AssociationGraphImplObserver< N, E, GraphImpl >::getGraph(), and bpp::AssociationGraphImplObserver< N, E, GraphImpl >::getNodeGraphid().

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

◆ getOutgoingEdges() [2/2]

◆ getOutgoingNeighbors() [1/2]

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

◆ getOutgoingNeighbors() [2/2]

◆ getRoot()

◆ getRootIndex()

◆ hasEdge() [1/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 927 of file AssociationGraphImplObserver.h.

References bpp::AssociationGraphImplObserver< N, E, GraphImpl >::indexToE_.

◆ hasEdge() [2/2]

◆ hasEdgeIndex()

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

◆ hasNode() [1/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 918 of file AssociationGraphImplObserver.h.

References bpp::AssociationGraphImplObserver< N, E, GraphImpl >::indexToN_.

◆ hasNode() [2/2]

◆ 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 1432 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]

◆ isLeaf() [2/2]

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

◆ link()

◆ nodeToString()

◆ 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 1418 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

Definition at line 971 of file AssociationGraphImplObserver.h.

◆ outputToDot() [2/2]

◆ 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 834 of file AssociationGraphImplObserver.h.

References bpp::AssociationGraphImplObserver< N, E, GraphImpl >::edgeToString(), bpp::AssociationGraphImplObserver< N, E, GraphImpl >::EToIndex_, bpp::AssociationGraphImplObserver< N, E, GraphImpl >::hasEdge(), and bpp::AssociationGraphImplObserver< N, E, GraphImpl >::indexToE_.

◆ 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 1496 of file AssociationGraphImplObserver.h.

References bpp::AssociationGraphImplObserver< N, E, GraphImpl >::associateEdge(), bpp::AssociationGraphImplObserver< N, E, GraphImpl >::getEdge(), bpp::AssociationGraphImplObserver< N, E, GraphImpl >::getGraph(), and bpp::AssociationGraphImplObserver< N, E, GraphImpl >::getNodeGraphid().

◆ setNodeIndex()

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

◆ 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 720 of file AssociationGraphImplObserver.h.

References bpp::AssociationGraphImplObserver< N, E, GraphImpl >::getGraph(), and bpp::AssociationGraphImplObserver< N, E, GraphImpl >::getNodeGraphid().

◆ unlink()

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

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 1602 of file AssociationGraphImplObserver.h.

Member Data Documentation

◆ EToGraphid_

◆ EToIndex_

◆ graphidToE_

◆ graphidToN_

◆ indexToE_

◆ indexToN_

◆ NToGraphid_

◆ NToIndex_

◆ 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 80 of file AssociationGraphImplObserver.h.

Referenced by bpp::AssociationGraphImplObserver< N, E, GraphImpl >::getGraph().


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