bpp-core  2.2.0
bpp::BasicONode Class Referenceabstract

Simple implementation of ONode. More...

#include <Bpp/Graph/BasicONode.h>

+ Inheritance diagram for bpp::BasicONode:
+ Collaboration diagram for bpp::BasicONode:

Public Member Functions

 BasicONode ()
 
Neighbors
virtual const ONodegetNeighbor (int pos) const =0
 Get a neighbor of this node in const context. More...
 
virtual ONodegetNeighbor (int pos)=0
 Get a neighbor of this node. More...
 
The Clonable interface.
ONodeclone () const =0
 Create a copy of this object and send a pointer to it. More...
 
Fathers
virtual const ONodegetFather (int pos) const =0
 Get a particular father in const environment. More...
 
virtual ONodegetFather (int pos)=0
 Get a particular father. More...
 
virtual bool hasFathers () const =0
 Tell if this node has one or more father nodes. More...
 
virtual int getNumberOfFathers () const =0
 Give the number of father nodes for this node. More...
 
Sons
virtual const ONodegetSon (int pos) const =0
 Get a particular son in const environment. More...
 
virtual ONodegetSon (int pos)=0
 Get a particular son. More...
 
virtual bool hasSons () const =0
 Tell if this node has one or more son nodes. More...
 
virtual int getNumberOfSons () const =0
 Give the number of son nodes for this node. More...
 
Operators
virtual const ONodeoperator[] (int i) const =0
 Direct access to a neighbor in const context. More...
 
virtual ONodeoperator[] (int i)=0
 Direct access to a neighbor. More...
 
Neighbors
virtual int degree () const =0
 Get the degree i.e. the number of neighbors of this node. More...
 

Detailed Description

Simple implementation of ONode.

Contains only methods for node manipulation.

Warning
Class not implemented yet!
Author
Sylvain Gaillard

Definition at line 55 of file BasicONode.h.

Constructor & Destructor Documentation

◆ BasicONode()

BasicONode::BasicONode ( )

Definition at line 44 of file BasicONode.cpp.

Member Function Documentation

◆ clone()

ONode* bpp::ONode::clone ( ) const
pure virtualinherited

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

Returns
A pointer toward the copy object.

Implements bpp::UNode.

Implemented in bpp::BasicTNode, and bpp::TNode.

◆ degree()

virtual int bpp::UNode::degree ( ) const
pure virtualinherited

Get the degree i.e. the number of neighbors of this node.

Implemented in bpp::BasicTNode.

◆ getFather() [1/2]

virtual const ONode* bpp::ONode::getFather ( int  pos) const
pure virtualinherited

Get a particular father in const environment.

Implemented in bpp::BasicTNode, and bpp::TNode.

◆ getFather() [2/2]

virtual ONode* bpp::ONode::getFather ( int  pos)
pure virtualinherited

Get a particular father.

Implemented in bpp::BasicTNode, and bpp::TNode.

◆ getNeighbor() [1/2]

virtual const ONode* bpp::ONode::getNeighbor ( int  pos) const
pure virtualinherited

Get a neighbor of this node in const context.

Parameters
posthe position of the neighbor to get.
Returns
A pointer toward the neighbor node.

Implements bpp::UNode.

Implemented in bpp::BasicTNode, and bpp::TNode.

◆ getNeighbor() [2/2]

virtual ONode* bpp::ONode::getNeighbor ( int  pos)
pure virtualinherited

Get a neighbor of this node.

Parameters
posthe position of the neighbor to get.
Returns
A pointer toward the neighbor node.

Implements bpp::UNode.

Implemented in bpp::BasicTNode, and bpp::TNode.

◆ getNumberOfFathers()

virtual int bpp::ONode::getNumberOfFathers ( ) const
pure virtualinherited

Give the number of father nodes for this node.

Implemented in bpp::BasicTNode.

◆ getNumberOfSons()

virtual int bpp::ONode::getNumberOfSons ( ) const
pure virtualinherited

Give the number of son nodes for this node.

Implemented in bpp::BasicTNode.

◆ getSon() [1/2]

virtual const ONode* bpp::ONode::getSon ( int  pos) const
pure virtualinherited

Get a particular son in const environment.

Implemented in bpp::BasicTNode, and bpp::TNode.

◆ getSon() [2/2]

virtual ONode* bpp::ONode::getSon ( int  pos)
pure virtualinherited

Get a particular son.

Implemented in bpp::BasicTNode, and bpp::TNode.

◆ hasFathers()

virtual bool bpp::ONode::hasFathers ( ) const
pure virtualinherited

Tell if this node has one or more father nodes.

Implemented in bpp::BasicTNode.

◆ hasSons()

virtual bool bpp::ONode::hasSons ( ) const
pure virtualinherited

Tell if this node has one or more son nodes.

Implemented in bpp::BasicTNode.

◆ operator[]() [1/2]

virtual const ONode* bpp::ONode::operator[] ( int  i) const
pure virtualinherited

Direct access to a neighbor in const context.

  • a positive i gives access to sons (from 0 to n - 1)
  • a negative i gives access to fathers (from 1 to m)

No check is done, you have to ensure that you query an existing neighbor.

Parameters
ithe position of the neighbor
Returns
A pointer toward the neighbor

Implements bpp::UNode.

Implemented in bpp::TNode, and bpp::BasicTNode.

◆ operator[]() [2/2]

virtual ONode* bpp::ONode::operator[] ( int  i)
pure virtualinherited

Direct access to a neighbor.

  • a positive i gives access to sons (from 0 to n - 1)
  • a negative i gives access to fathers (from 1 to m)

No check is done, you have to ensure that you query an existing neighbor.

Parameters
ithe position of the neighbor
Returns
A pointer toward the neighbor

Implements bpp::UNode.

Implemented in bpp::TNode, and bpp::BasicTNode.


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