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

Defines a Graph Associator. It is a template which follows (subscribed to) a Graph. More...

#include <Bpp/Graph/AssociationGraphObserver.h>

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

Classes

class  EdgeIterator
 
class  NodeIterator
 

Public Types

typedef unsigned int NodeIndex
 
typedef unsigned int EdgeIndex
 

Public Member Functions

virtual Clonableclone () const =0
 Create a copy of this object and send a pointer to it. More...
 
Graph Relations Management

Modificating the structure of the graph.

virtual void createNode (std::shared_ptr< N > newNodeObject)=0
 
virtual void createNode (std::shared_ptr< N > objectOriginNode, std::shared_ptr< N > newNodeObject, std::shared_ptr< E > newEdgeObject=00)=0
 
virtual void link (std::shared_ptr< N > nodeObjectA, std::shared_ptr< N > nodeObjectB, std::shared_ptr< E > edgeObject=00)=0
 
virtual void unlink (std::shared_ptr< N > nodeObjectA, std::shared_ptr< N > nodeObjectB)=0
 
virtual void deleteNode (std::shared_ptr< N > nodeObject)=0
 
Object Association

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

virtual void associateNode (std::shared_ptr< N > nodeObject, NodeGraphid node)=0
 
virtual void associateEdge (std::shared_ptr< E > edgeObject, EdgeGraphid edge)=0
 
virtual void dissociateNode (std::shared_ptr< N > nodeObject)=0
 
virtual void dissociateEdge (std::shared_ptr< E > edgeObject)=0
 
virtual NodeGraphid getNodeGraphid (const std::shared_ptr< N > nodeObject) const =0
 
virtual EdgeGraphid getEdgeGraphid (const std::shared_ptr< E > edgeObject) const =0
 
virtual const std::shared_ptr< N > getNodeFromGraphid (NodeGraphid) const =0
 
virtual std::shared_ptr< N > getNodeFromGraphid (NodeGraphid)=0
 
virtual std::vector< std::shared_ptr< N > > getNodesFromGraphid (std::vector< NodeGraphid >) const =0
 
virtual std::shared_ptr< E > getEdgeFromGraphid (EdgeGraphid)=0
 
virtual const std::shared_ptr< E > getEdgeFromGraphid (EdgeGraphid) const =0
 
virtual std::vector< std::shared_ptr< E > > getEdgesFromGraphid (std::vector< EdgeGraphid >) const =0
 
virtual std::shared_ptr< N > getRoot () const =0
 
virtual NodeIndex getRootIndex () const =0
 
Object Indexation

Get or set indexes to nodes and edges

virtual bool hasNodeIndex (const std::shared_ptr< N > nodeObject) const =0
 return if the object has an index. More...
 
virtual bool hasEdgeIndex (const std::shared_ptr< E > edgeObject) const =0
 
virtual NodeIndex getNodeIndex (const std::shared_ptr< N > nodeObject) const =0
 
virtual std::vector< NodeIndexgetNodeIndexes (std::vector< std::shared_ptr< N > > nodeObjects) const =0
 
virtual EdgeIndex getEdgeIndex (const std::shared_ptr< E > edgeObject) const =0
 
virtual std::vector< EdgeIndexgetEdgeIndexes (std::vector< std::shared_ptr< E > > edgeObjects) const =0
 
virtual NodeIndex setNodeIndex (const std::shared_ptr< N > nodeObject, NodeIndex index)=0
 
virtual EdgeIndex setEdgeIndex (const std::shared_ptr< E > edgeObject, EdgeIndex index)=0
 
virtual bool hasNode (NodeIndex nodeIndex) const =0
 
virtual bool hasEdge (EdgeIndex edgeIndex) const =0
 
virtual std::shared_ptr< N > getNode (NodeIndex nodeIndex) const =0
 
virtual std::shared_ptr< E > getEdge (EdgeIndex edgeIndex) const =0
 
Iterator interface on Nodes
virtual std::unique_ptr< NodeIteratorallNodesIterator ()=0
 
virtual std::unique_ptr< NodeIteratorallNodesIterator () const =0
 
virtual std::unique_ptr< NodeIteratoroutgoingNeighborNodesIterator (std::shared_ptr< N > node)=0
 
virtual std::unique_ptr< NodeIteratoroutgoingNeighborNodesIterator (std::shared_ptr< N > node) const =0
 
virtual std::unique_ptr< NodeIteratorincomingNeighborNodesIterator (std::shared_ptr< N > node)=0
 
virtual std::unique_ptr< NodeIteratorincomingNeighborNodesIterator (std::shared_ptr< N > node) const =0
 
virtual std::vector< std::shared_ptr< N > > getNeighbors (const std::shared_ptr< N > node) const =0
 
virtual std::vector< NodeIndexgetNeighbors (NodeIndex node) const =0
 
virtual std::vector< std::shared_ptr< E > > getEdges (const std::shared_ptr< N > node) const =0
 
virtual std::vector< EdgeIndexgetEdges (NodeIndex node) const =0
 
virtual std::vector< std::shared_ptr< N > > getOutgoingNeighbors (const std::shared_ptr< N > node) const =0
 
virtual std::vector< NodeIndexgetOutgoingNeighbors (NodeIndex node) const =0
 
virtual std::vector< std::shared_ptr< E > > getOutgoingEdges (const std::shared_ptr< N > node) const =0
 
virtual std::vector< EdgeIndexgetOutgoingEdges (NodeIndex node) const =0
 
virtual std::vector< std::shared_ptr< N > > getIncomingNeighbors (const std::shared_ptr< N > node) const =0
 
virtual std::vector< NodeIndexgetIncomingNeighbors (NodeIndex node) const =0
 
virtual std::vector< std::shared_ptr< E > > getIncomingEdges (const std::shared_ptr< N > node) const =0
 
virtual std::vector< EdgeIndexgetIncomingEdges (NodeIndex node) const =0
 
virtual std::vector< std::shared_ptr< N > > getLeavesFromNode (std::shared_ptr< N > node, unsigned int maxDepth) const =0
 
virtual std::vector< std::shared_ptr< N > > getAllLeaves () const =0
 
virtual std::vector< NodeIndexgetAllLeavesIndexes () const =0
 
virtual std::vector< std::shared_ptr< N > > getAllInnerNodes () const =0
 
virtual std::vector< NodeIndexgetAllInnerNodesIndexes () const =0
 
virtual std::vector< std::shared_ptr< N > > getAllNodes () const =0
 
virtual std::vector< NodeIndexgetAllNodesIndexes () const =0
 
Iterator interface on Edges
virtual std::unique_ptr< EdgeIteratorallEdgesIterator ()=0
 
virtual std::unique_ptr< EdgeIteratoroutgoingEdgesIterator (std::shared_ptr< N > node)=0
 
virtual std::unique_ptr< EdgeIteratorincomingEdgesIterator (std::shared_ptr< N > node)=0
 
virtual std::vector< std::shared_ptr< E > > getAllEdges () const =0
 
virtual std::vector< EdgeIndexgetAllEdgesIndexes () const =0
 
virtual std::shared_ptr< E > getEdgeLinking (std::shared_ptr< N > nodeA, std::shared_ptr< N > nodeB) const =0
 
virtual void setEdgeLinking (std::shared_ptr< N > nodeA, std::shared_ptr< N > nodeB, std::shared_ptr< E > edge)=0
 
Function called by the subjectGraph

Methods called by the subject graph to make this observer so fit the subject graph

virtual void deletedEdgesUpdate (const std::vector< unsigned int > &edgesToDelete)=0
 
virtual void deletedNodesUpdate (const std::vector< unsigned int > &nodesToDelete)=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)
 

Private Types

typedef Graph::NodeId NodeGraphid
 
typedef Graph::EdgeId EdgeGraphid
 

Detailed Description

template<class N, class E>
class bpp::AssociationGraphObserver< N, E >

Defines a Graph Associator. It is a template which follows (subscribed to) a Graph.

Author
Thomas Bigot, Laurent Guéguen

Definition at line 65 of file AssociationGraphObserver.h.

Member Typedef Documentation

◆ EdgeGraphid

template<class N , class E >
typedef Graph::EdgeId bpp::AssociationGraphObserver< N, E >::EdgeGraphid
private

Definition at line 70 of file AssociationGraphObserver.h.

◆ EdgeIndex

template<class N , class E >
typedef unsigned int bpp::AssociationGraphObserver< N, E >::EdgeIndex

Definition at line 74 of file AssociationGraphObserver.h.

◆ NodeGraphid

template<class N , class E >
typedef Graph::NodeId bpp::AssociationGraphObserver< N, E >::NodeGraphid
private

Definition at line 69 of file AssociationGraphObserver.h.

◆ NodeIndex

template<class N , class E >
typedef unsigned int bpp::AssociationGraphObserver< N, E >::NodeIndex

Definition at line 73 of file AssociationGraphObserver.h.

Member Function Documentation

◆ allEdgesIterator()

◆ allNodesIterator() [1/2]

◆ allNodesIterator() [2/2]

◆ associateEdge()

template<class N , class E >
virtual void bpp::AssociationGraphObserver< N, E >::associateEdge ( std::shared_ptr< E >  edgeObject,
EdgeGraphid  edge 
)
pure virtual

Associate a E object to an edge in the graph.

Parameters
edgeObjectobject to associate
edgeexisting edge to be associated

Implemented in bpp::AssociationGraphImplObserver< N, E, GraphImpl >, bpp::AssociationGraphImplObserver< N, E, DAGraphImpl >, and bpp::AssociationGraphImplObserver< N, E, TreeGraphImpl >.

◆ associateNode()

template<class N , class E >
virtual void bpp::AssociationGraphObserver< N, E >::associateNode ( std::shared_ptr< N >  nodeObject,
NodeGraphid  node 
)
pure virtual

Associate a N object to a node in the graph.

Parameters
nodeObjectobject to associate
nodeexisting node to be associated

Implemented in bpp::AssociationGraphImplObserver< N, E, GraphImpl >, bpp::AssociationGraphImplObserver< N, E, DAGraphImpl >, and bpp::AssociationGraphImplObserver< N, E, TreeGraphImpl >.

◆ clone()

virtual Clonable* bpp::Clonable::clone ( ) const
pure virtualinherited

Create a copy of this object and send a pointer to it.

Returns
A pointer toward the copy object.

Implemented in bpp::TransformedParameter, bpp::MultipleDiscreteDistribution, bpp::DiscreteDistribution, bpp::ParameterListener, bpp::BppNumberI, bpp::HmmLikelihood, bpp::HmmEmissionProbabilities, bpp::Optimizer, bpp::OptimizationStopCondition, bpp::DerivableSecondOrder, bpp::DerivableFirstOrder, bpp::AbstractNumericalDerivative, bpp::Constraint, bpp::OutputStream, bpp::PlaceboTransformedParameter, bpp::IntervalTransformedParameter, bpp::RTransformedParameter, bpp::Table< T >, bpp::PrincipalComponentAnalysis, bpp::DualityDiagram, bpp::CorrespondenceAnalysis, bpp::ContingencyTableTest, bpp::Range< T >, bpp::UniformDiscreteDistribution, bpp::TruncatedExponentialDiscreteDistribution, bpp::Simplex, bpp::SimpleDiscreteDistribution, bpp::MixtureOfDiscreteDistributions, bpp::InvariantMixedDiscreteDistribution, bpp::GaussianDiscreteDistribution, bpp::GammaDiscreteDistribution, bpp::ExponentialDiscreteDistribution, bpp::DirichletDiscreteDistribution, bpp::ConstantDistribution, bpp::BetaDiscreteDistribution, bpp::ParametrizableCollection< N >, bpp::ParameterList, bpp::Parameter, bpp::ParameterEvent, bpp::BppUnsignedInteger, bpp::BppInteger, bpp::BppDouble, bpp::Number< T >, bpp::Number< double >, bpp::Number< int >, bpp::Number< unsigned int >, bpp::BppNotANumber, bpp::LinearMatrix< Scalar >, bpp::ColMatrix< Scalar >, bpp::RowMatrix< Scalar >, bpp::RowMatrix< double >, bpp::RowMatrix< Real >, bpp::RescaledHmmLikelihood, bpp::LowMemoryRescaledHmmLikelihood, bpp::LogsumHmmLikelihood, bpp::FullHmmTransitionMatrix, bpp::AutoCorrelationTransitionMatrix, bpp::TwoPointsNumericalDerivative, bpp::ThreePointsNumericalDerivative, bpp::SimpleNewtonMultiDimensions, bpp::SimpleMultiDimensions, bpp::ReparametrizationDerivableSecondOrderWrapper, bpp::ReparametrizationDerivableFirstOrderWrapper, bpp::ReparametrizationFunctionWrapper, bpp::PowellMultiDimensions, bpp::PowellMultiDimensions::PMDStopCondition, bpp::FunctionStopCondition, bpp::ParametersStopCondition, bpp::NegativeOperator, bpp::MathOperator, bpp::FunctionOperator< F >, bpp::ConstantOperator, bpp::ComputationTree, bpp::BinaryOperator, bpp::NewtonOneDimension, bpp::NewtonBacktrackOneDimension, bpp::NewtonBacktrackOneDimension::NBODStopCondition, bpp::MetaOptimizer, bpp::MetaOptimizerInfos, bpp::GoldenSectionSearch, bpp::GoldenSectionSearch::GSSStopCondition, bpp::TestFunction, bpp::InfinityDerivableSecondOrderWrapper, bpp::InfinityDerivableFirstOrderWrapper, bpp::InfinityFunctionWrapper, bpp::FivePointsNumericalDerivative, bpp::DownhillSimplexMethod, bpp::DownhillSimplexMethod::DSMStopCondition, bpp::DirectionFunction, bpp::ConjugateGradientMultiDimensions, bpp::BrentOneDimension, bpp::BrentOneDimension::BODStopCondition, bpp::BfgsMultiDimensions, bpp::DataTable, bpp::IntervalConstraint, bpp::AutoParameter, bpp::AliasParameterListener, bpp::StdErr, bpp::StdOut, bpp::StlOutputStreamWrapper, bpp::StlOutputStream, bpp::NullOutputStream, bpp::RGBColor, bpp::Point2D< T >, bpp::Font, bpp::GlobalGraph, bpp::AssociationTreeGraphImplObserver< N, E, TreeGraphImpl >, bpp::AssociationGraphImplObserver< N, E, GraphImpl >, bpp::AssociationGraphImplObserver< N, E, DAGraphImpl >, bpp::AssociationGraphImplObserver< N, E, TreeGraphImpl >, bpp::AssociationDAGraphImplObserver< N, E, DAGraphImpl >, bpp::BppVector< T >, bpp::BppString, and bpp::BppBoolean.

Referenced by bpp::AbstractParameterAliasable::aliasParameters(), bpp::LogsumHmmLikelihood::LogsumHmmLikelihood(), and bpp::LogsumHmmLikelihood::operator=().

◆ 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 
)
inlinestatic

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

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

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

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

Definition at line 101 of file AssociationGraphObserver.h.

◆ createNode() [1/2]

template<class N , class E >
virtual void bpp::AssociationGraphObserver< N, E >::createNode ( std::shared_ptr< N >  newNodeObject)
pure virtual

Creates an orphaned node from a NodeClass object.

Parameters
newNodeObjectthe N object associated to the node in the graph.

Implemented in bpp::AssociationGraphImplObserver< N, E, GraphImpl >, bpp::AssociationGraphImplObserver< N, E, DAGraphImpl >, and bpp::AssociationGraphImplObserver< N, E, TreeGraphImpl >.

◆ createNode() [2/2]

template<class N , class E >
virtual void bpp::AssociationGraphObserver< N, E >::createNode ( std::shared_ptr< N >  objectOriginNode,
std::shared_ptr< N >  newNodeObject,
std::shared_ptr< E >  newEdgeObject = 00 
)
pure virtual

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

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

Implemented in bpp::AssociationGraphImplObserver< N, E, GraphImpl >, bpp::AssociationGraphImplObserver< N, E, DAGraphImpl >, and bpp::AssociationGraphImplObserver< N, E, TreeGraphImpl >.

◆ deletedEdgesUpdate()

virtual void bpp::GraphObserver::deletedEdgesUpdate ( const std::vector< unsigned int > &  edgesToDelete)
pure virtualinherited

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

Parameters
edgesToDeletea vector of Edges to delete

Implemented in bpp::AssociationGraphImplObserver< N, E, GraphImpl >, bpp::AssociationGraphImplObserver< N, E, DAGraphImpl >, and bpp::AssociationGraphImplObserver< N, E, TreeGraphImpl >.

◆ deletedNodesUpdate()

virtual void bpp::GraphObserver::deletedNodesUpdate ( const std::vector< unsigned int > &  nodesToDelete)
pure virtualinherited

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

Parameters
nodesToDeletea vector of N to delete

Implemented in bpp::AssociationGraphImplObserver< N, E, GraphImpl >, bpp::AssociationGraphImplObserver< N, E, DAGraphImpl >, and bpp::AssociationGraphImplObserver< N, E, TreeGraphImpl >.

◆ deleteNode()

template<class N , class E >
virtual void bpp::AssociationGraphObserver< N, E >::deleteNode ( std::shared_ptr< N >  nodeObject)
pure virtual

◆ dissociateEdge()

template<class N , class E >
virtual void bpp::AssociationGraphObserver< N, E >::dissociateEdge ( std::shared_ptr< E >  edgeObject)
pure virtual

◆ dissociateNode()

template<class N , class E >
virtual void bpp::AssociationGraphObserver< N, E >::dissociateNode ( std::shared_ptr< N >  nodeObject)
pure virtual

Dissociate a N or E object to a node or an edge in the graph. Graph is not changed.

Parameters
nodeObjectobject to dissociate

Implemented in bpp::AssociationGraphImplObserver< N, E, GraphImpl >, bpp::AssociationGraphImplObserver< N, E, DAGraphImpl >, and bpp::AssociationGraphImplObserver< N, E, TreeGraphImpl >.

◆ getAllEdges()

template<class N , class E >
virtual std::vector<std::shared_ptr<E> > bpp::AssociationGraphObserver< N, E >::getAllEdges ( ) const
pure virtual

Get all the defined edges of a graphO,

Returns
a vector containing the branchesObjects

Implemented in bpp::AssociationGraphImplObserver< N, E, GraphImpl >, bpp::AssociationGraphImplObserver< N, E, DAGraphImpl >, and bpp::AssociationGraphImplObserver< N, E, TreeGraphImpl >.

◆ getAllEdgesIndexes()

◆ getAllInnerNodes()

template<class N , class E >
virtual std::vector<std::shared_ptr<N> > bpp::AssociationGraphObserver< N, E >::getAllInnerNodes ( ) const
pure virtual

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

Returns
a vector containing the inner nodes.

Implemented in bpp::AssociationGraphImplObserver< N, E, GraphImpl >, bpp::AssociationGraphImplObserver< N, E, DAGraphImpl >, and bpp::AssociationGraphImplObserver< N, E, TreeGraphImpl >.

◆ getAllInnerNodesIndexes()

template<class N , class E >
virtual std::vector<NodeIndex> bpp::AssociationGraphObserver< N, E >::getAllInnerNodesIndexes ( ) const
pure virtual

◆ getAllLeaves()

template<class N , class E >
virtual std::vector<std::shared_ptr<N> > bpp::AssociationGraphObserver< N, E >::getAllLeaves ( ) const
pure virtual

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

Returns
a vector containing the leaves

Implemented in bpp::AssociationGraphImplObserver< N, E, GraphImpl >, bpp::AssociationGraphImplObserver< N, E, DAGraphImpl >, and bpp::AssociationGraphImplObserver< N, E, TreeGraphImpl >.

◆ getAllLeavesIndexes()

◆ getAllNodes()

template<class N , class E >
virtual std::vector<std::shared_ptr<N> > bpp::AssociationGraphObserver< N, E >::getAllNodes ( ) const
pure virtual

Get all the defined nodes of a graphO,

Returns
a vector containing the nodesObjects

Implemented in bpp::AssociationGraphImplObserver< N, E, GraphImpl >, bpp::AssociationGraphImplObserver< N, E, DAGraphImpl >, and bpp::AssociationGraphImplObserver< N, E, TreeGraphImpl >.

◆ getAllNodesIndexes()

◆ getEdge()

template<class N , class E >
virtual std::shared_ptr<E> bpp::AssociationGraphObserver< N, E >::getEdge ( EdgeIndex  edgeIndex) const
pure virtual

Return the associated Node index

Parameters
edgeIndexthe index of the wanted edge
Returns
E, an edge object

Implemented in bpp::AssociationGraphImplObserver< N, E, GraphImpl >, bpp::AssociationGraphImplObserver< N, E, DAGraphImpl >, and bpp::AssociationGraphImplObserver< N, E, TreeGraphImpl >.

◆ getEdgeFromGraphid() [1/2]

template<class N , class E >
virtual const std::shared_ptr<E> bpp::AssociationGraphObserver< N, E >::getEdgeFromGraphid ( EdgeGraphid  ) const
pure virtual

◆ getEdgeFromGraphid() [2/2]

◆ getEdgeGraphid()

template<class N , class E >
virtual EdgeGraphid bpp::AssociationGraphObserver< N, E >::getEdgeGraphid ( const std::shared_ptr< E >  edgeObject) const
pure virtual

Return the associated Node ID

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

Implemented in bpp::AssociationGraphImplObserver< N, E, GraphImpl >, bpp::AssociationGraphImplObserver< N, E, DAGraphImpl >, and bpp::AssociationGraphImplObserver< N, E, TreeGraphImpl >.

◆ getEdgeIndex()

template<class N , class E >
virtual EdgeIndex bpp::AssociationGraphObserver< N, E >::getEdgeIndex ( const std::shared_ptr< E >  edgeObject) const
pure virtual

Return the associated Node index

Parameters
edgeObjectobject which to return the node index
Returns
a node index

Implemented in bpp::AssociationGraphImplObserver< N, E, GraphImpl >, bpp::AssociationGraphImplObserver< N, E, DAGraphImpl >, and bpp::AssociationGraphImplObserver< N, E, TreeGraphImpl >.

◆ getEdgeIndexes()

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

◆ getEdgeLinking()

template<class N , class E >
virtual std::shared_ptr<E> bpp::AssociationGraphObserver< N, E >::getEdgeLinking ( std::shared_ptr< N >  nodeA,
std::shared_ptr< N >  nodeB 
) const
pure virtual

Returns the Edge between two nodes nodeA -> nodeB

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

Implemented in bpp::AssociationGraphImplObserver< N, E, GraphImpl >, bpp::AssociationGraphImplObserver< N, E, DAGraphImpl >, and bpp::AssociationGraphImplObserver< N, E, TreeGraphImpl >.

◆ getEdges() [1/2]

template<class N , class E >
virtual std::vector<std::shared_ptr<E> > bpp::AssociationGraphObserver< N, E >::getEdges ( const std::shared_ptr< N >  node) const
pure virtual

Get all the edges from/to a node in the graph.

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

Implemented in bpp::AssociationGraphImplObserver< N, E, GraphImpl >, bpp::AssociationGraphImplObserver< N, E, DAGraphImpl >, and bpp::AssociationGraphImplObserver< N, E, TreeGraphImpl >.

◆ getEdges() [2/2]

◆ getEdgesFromGraphid()

template<class N , class E >
virtual std::vector<std::shared_ptr<E> > bpp::AssociationGraphObserver< N, E >::getEdgesFromGraphid ( std::vector< EdgeGraphid ) const
pure virtual

◆ getIncomingEdges() [1/2]

template<class N , class E >
virtual std::vector<std::shared_ptr<E> > bpp::AssociationGraphObserver< N, E >::getIncomingEdges ( const std::shared_ptr< N >  node) const
pure virtual

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

Implemented in bpp::AssociationGraphImplObserver< N, E, GraphImpl >, bpp::AssociationGraphImplObserver< N, E, DAGraphImpl >, and bpp::AssociationGraphImplObserver< N, E, TreeGraphImpl >.

◆ getIncomingEdges() [2/2]

◆ getIncomingNeighbors() [1/2]

template<class N , class E >
virtual std::vector<std::shared_ptr<N> > bpp::AssociationGraphObserver< N, E >::getIncomingNeighbors ( const std::shared_ptr< N >  node) const
pure virtual

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

Implemented in bpp::AssociationGraphImplObserver< N, E, GraphImpl >, bpp::AssociationGraphImplObserver< N, E, DAGraphImpl >, and bpp::AssociationGraphImplObserver< N, E, TreeGraphImpl >.

◆ getIncomingNeighbors() [2/2]

◆ getLeavesFromNode()

template<class N , class E >
virtual std::vector<std::shared_ptr<N> > bpp::AssociationGraphObserver< N, E >::getLeavesFromNode ( std::shared_ptr< N >  node,
unsigned int  maxDepth 
) const
pure virtual

Get the leaves of a graph, ie, nodes with only one neighbor, starting from a peculiar node, up to a specific depth.

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

Implemented in bpp::AssociationGraphImplObserver< N, E, GraphImpl >, bpp::AssociationGraphImplObserver< N, E, DAGraphImpl >, and bpp::AssociationGraphImplObserver< N, E, TreeGraphImpl >.

◆ getNeighbors() [1/2]

template<class N , class E >
virtual std::vector<std::shared_ptr<N> > bpp::AssociationGraphObserver< N, E >::getNeighbors ( const std::shared_ptr< N >  node) const
pure virtual

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

Implemented in bpp::AssociationGraphImplObserver< N, E, GraphImpl >, bpp::AssociationGraphImplObserver< N, E, DAGraphImpl >, and bpp::AssociationGraphImplObserver< N, E, TreeGraphImpl >.

◆ getNeighbors() [2/2]

◆ getNode()

template<class N , class E >
virtual std::shared_ptr<N> bpp::AssociationGraphObserver< N, E >::getNode ( NodeIndex  nodeIndex) const
pure virtual

Return the associated Node, querying with an index

Parameters
nodeIndexthe index of the wanted node
Returns
N, a node object

Implemented in bpp::AssociationGraphImplObserver< N, E, GraphImpl >, bpp::AssociationGraphImplObserver< N, E, DAGraphImpl >, and bpp::AssociationGraphImplObserver< N, E, TreeGraphImpl >.

◆ getNodeFromGraphid() [1/2]

template<class N , class E >
virtual const std::shared_ptr<N> bpp::AssociationGraphObserver< N, E >::getNodeFromGraphid ( NodeGraphid  ) const
pure virtual

◆ getNodeFromGraphid() [2/2]

◆ getNodeGraphid()

template<class N , class E >
virtual NodeGraphid bpp::AssociationGraphObserver< N, E >::getNodeGraphid ( const std::shared_ptr< N >  nodeObject) const
pure virtual

Return the associated Node ID

Parameters
nodeObjectobject which to return the node ID
Returns
a node ID

Implemented in bpp::AssociationGraphImplObserver< N, E, GraphImpl >, bpp::AssociationGraphImplObserver< N, E, DAGraphImpl >, and bpp::AssociationGraphImplObserver< N, E, TreeGraphImpl >.

◆ getNodeIndex()

template<class N , class E >
virtual NodeIndex bpp::AssociationGraphObserver< N, E >::getNodeIndex ( const std::shared_ptr< N >  nodeObject) const
pure virtual

Return the associated Node index

Parameters
nodeObjectobject which to return the node index
Returns
a node index

Implemented in bpp::AssociationGraphImplObserver< N, E, GraphImpl >, bpp::AssociationGraphImplObserver< N, E, DAGraphImpl >, and bpp::AssociationGraphImplObserver< N, E, TreeGraphImpl >.

◆ getNodeIndexes()

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

◆ getNodesFromGraphid()

template<class N , class E >
virtual std::vector<std::shared_ptr<N> > bpp::AssociationGraphObserver< N, E >::getNodesFromGraphid ( std::vector< NodeGraphid ) const
pure virtual

◆ getOutgoingEdges() [1/2]

template<class N , class E >
virtual std::vector<std::shared_ptr<E> > bpp::AssociationGraphObserver< N, E >::getOutgoingEdges ( const std::shared_ptr< N >  node) const
pure virtual

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

Implemented in bpp::AssociationGraphImplObserver< N, E, GraphImpl >, bpp::AssociationGraphImplObserver< N, E, DAGraphImpl >, and bpp::AssociationGraphImplObserver< N, E, TreeGraphImpl >.

◆ getOutgoingEdges() [2/2]

◆ getOutgoingNeighbors() [1/2]

template<class N , class E >
virtual std::vector<std::shared_ptr<N> > bpp::AssociationGraphObserver< N, E >::getOutgoingNeighbors ( const std::shared_ptr< N >  node) const
pure virtual

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

Implemented in bpp::AssociationGraphImplObserver< N, E, GraphImpl >, bpp::AssociationGraphImplObserver< N, E, DAGraphImpl >, and bpp::AssociationGraphImplObserver< N, E, TreeGraphImpl >.

◆ getOutgoingNeighbors() [2/2]

◆ getRoot()

template<class N , class E >
virtual std::shared_ptr<N> bpp::AssociationGraphObserver< N, E >::getRoot ( ) const
pure virtual

◆ getRootIndex()

◆ hasEdge()

template<class N , class E >
virtual bool bpp::AssociationGraphObserver< N, E >::hasEdge ( EdgeIndex  edgeIndex) const
pure virtual

Return if the Graph has an edge matching edgeIndex

Parameters
edgeIndexthe index of the wanted edge

Implemented in bpp::AssociationGraphImplObserver< N, E, GraphImpl >, bpp::AssociationGraphImplObserver< N, E, DAGraphImpl >, and bpp::AssociationGraphImplObserver< N, E, TreeGraphImpl >.

◆ hasEdgeIndex()

template<class N , class E >
virtual bool bpp::AssociationGraphObserver< N, E >::hasEdgeIndex ( const std::shared_ptr< E >  edgeObject) const
pure virtual

◆ hasNode()

template<class N , class E >
virtual bool bpp::AssociationGraphObserver< N, E >::hasNode ( NodeIndex  nodeIndex) const
pure virtual

Return if the Graph has a node matching nodeIndex

Parameters
nodeIndexthe index of the wanted node

Implemented in bpp::AssociationGraphImplObserver< N, E, GraphImpl >, bpp::AssociationGraphImplObserver< N, E, DAGraphImpl >, and bpp::AssociationGraphImplObserver< N, E, TreeGraphImpl >.

◆ hasNodeIndex()

template<class N , class E >
virtual bool bpp::AssociationGraphObserver< N, E >::hasNodeIndex ( const std::shared_ptr< N >  nodeObject) const
pure virtual

◆ incomingEdgesIterator()

template<class N , class E >
virtual std::unique_ptr<EdgeIterator> bpp::AssociationGraphObserver< N, E >::incomingEdgesIterator ( std::shared_ptr< N >  node)
pure virtual

◆ incomingNeighborNodesIterator() [1/2]

template<class N , class E >
virtual std::unique_ptr<NodeIterator> bpp::AssociationGraphObserver< N, E >::incomingNeighborNodesIterator ( std::shared_ptr< N >  node) const
pure virtual

◆ incomingNeighborNodesIterator() [2/2]

template<class N , class E >
virtual std::unique_ptr<NodeIterator> bpp::AssociationGraphObserver< N, E >::incomingNeighborNodesIterator ( std::shared_ptr< N >  node)
pure virtual

◆ link()

template<class N , class E >
virtual void bpp::AssociationGraphObserver< N, E >::link ( std::shared_ptr< N >  nodeObjectA,
std::shared_ptr< N >  nodeObjectB,
std::shared_ptr< E >  edgeObject = 00 
)
pure virtual

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)

Implemented in bpp::AssociationGraphImplObserver< N, E, GraphImpl >, bpp::AssociationGraphImplObserver< N, E, DAGraphImpl >, and bpp::AssociationGraphImplObserver< N, E, TreeGraphImpl >.

◆ outgoingEdgesIterator()

template<class N , class E >
virtual std::unique_ptr<EdgeIterator> bpp::AssociationGraphObserver< N, E >::outgoingEdgesIterator ( std::shared_ptr< N >  node)
pure virtual

◆ outgoingNeighborNodesIterator() [1/2]

template<class N , class E >
virtual std::unique_ptr<NodeIterator> bpp::AssociationGraphObserver< N, E >::outgoingNeighborNodesIterator ( std::shared_ptr< N >  node) const
pure virtual

◆ outgoingNeighborNodesIterator() [2/2]

template<class N , class E >
virtual std::unique_ptr<NodeIterator> bpp::AssociationGraphObserver< N, E >::outgoingNeighborNodesIterator ( std::shared_ptr< N >  node)
pure virtual

◆ setEdgeIndex()

template<class N , class E >
virtual EdgeIndex bpp::AssociationGraphObserver< N, E >::setEdgeIndex ( const std::shared_ptr< E >  edgeObject,
EdgeIndex  index 
)
pure virtual

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

Implemented in bpp::AssociationGraphImplObserver< N, E, GraphImpl >, bpp::AssociationGraphImplObserver< N, E, DAGraphImpl >, and bpp::AssociationGraphImplObserver< N, E, TreeGraphImpl >.

◆ setEdgeLinking()

template<class N , class E >
virtual void bpp::AssociationGraphObserver< N, E >::setEdgeLinking ( std::shared_ptr< N >  nodeA,
std::shared_ptr< N >  nodeB,
std::shared_ptr< E >  edge 
)
pure virtual

Sets the Edge between two nodes nodeA -> nodeB

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

Implemented in bpp::AssociationGraphImplObserver< N, E, GraphImpl >, bpp::AssociationGraphImplObserver< N, E, DAGraphImpl >, and bpp::AssociationGraphImplObserver< N, E, TreeGraphImpl >.

◆ setNodeIndex()

template<class N , class E >
virtual NodeIndex bpp::AssociationGraphObserver< N, E >::setNodeIndex ( const std::shared_ptr< N >  nodeObject,
NodeIndex  index 
)
pure virtual

Set an index associated to a node

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

Implemented in bpp::AssociationGraphImplObserver< N, E, GraphImpl >, bpp::AssociationGraphImplObserver< N, E, DAGraphImpl >, and bpp::AssociationGraphImplObserver< N, E, TreeGraphImpl >.

◆ unlink()

template<class N , class E >
virtual void bpp::AssociationGraphObserver< N, E >::unlink ( std::shared_ptr< N >  nodeObjectA,
std::shared_ptr< N >  nodeObjectB 
)
pure virtual

Detroys a link between two existing nodes in the graph. If directed graph: nodeA -> nodeB.

Parameters
nodeObjectAsource node (or first node if undirected)
nodeObjectBtarget node (or second node if undirected)

Implemented in bpp::AssociationGraphImplObserver< N, E, GraphImpl >, bpp::AssociationGraphImplObserver< N, E, DAGraphImpl >, and bpp::AssociationGraphImplObserver< N, E, TreeGraphImpl >.


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