bpp-core  2.1.0
bpp::ONode Class Reference

Oriented Node interface. More...

#include <Bpp/Graph/ONode.h>

+ Inheritance diagram for bpp::ONode:
+ Collaboration diagram for bpp::ONode:

List of all members.

Public Member Functions

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

Detailed Description

Oriented Node interface.

ONode is an interface for oriented nodes aimed to build oriented graphs.

Author:
Sylvain Gaillard

Definition at line 53 of file ONode.h.


Member Function Documentation

ONode* bpp::ONode::clone ( ) const [pure virtual]

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.

virtual int bpp::UNode::degree ( ) const [pure virtual, inherited]

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

Implemented in bpp::BasicTNode.

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

Get a particular father in const environment.

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

virtual ONode* bpp::ONode::getFather ( int  pos) [pure virtual]

Get a particular father.

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

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

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.

virtual ONode* bpp::ONode::getNeighbor ( int  pos) [pure virtual]

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.

virtual int bpp::ONode::getNumberOfFathers ( ) const [pure virtual]

Give the number of father nodes for this node.

Implemented in bpp::BasicTNode.

virtual int bpp::ONode::getNumberOfSons ( ) const [pure virtual]

Give the number of son nodes for this node.

Implemented in bpp::BasicTNode.

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

Get a particular son in const environment.

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

virtual ONode* bpp::ONode::getSon ( int  pos) [pure virtual]

Get a particular son.

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

virtual bool bpp::ONode::hasFathers ( ) const [pure virtual]

Tell if this node has one or more father nodes.

Implemented in bpp::BasicTNode.

virtual bool bpp::ONode::hasSons ( ) const [pure virtual]

Tell if this node has one or more son nodes.

Implemented in bpp::BasicTNode.

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

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.

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

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 file:
 All Classes Namespaces Files Functions Variables Typedefs Friends