bpp-core  2.2.0
bpp::UNode Class Referenceabstract

Unoriented node interface. More...

#include <Bpp/Graph/UNode.h>

+ Inheritance diagram for bpp::UNode:
+ Collaboration diagram for bpp::UNode:

Public Member Functions

Neighbors
virtual const UNodegetNeighbor (int pos) const =0
 Get a neighbor of this node in const context. More...
 
virtual UNodegetNeighbor (int pos)=0
 Get a neighbor of this node. More...
 
virtual int degree () const =0
 Get the degree i.e. the number of neighbors of this node. More...
 
The Clonable interface.
UNodeclone () const =0
 Create a copy of this object and send a pointer to it. More...
 
Operators
virtual const UNodeoperator[] (int i) const =0
 Direct access to a neighbor in const context. More...
 
virtual UNodeoperator[] (int i)=0
 Direct access to a neighbor. More...
 

Detailed Description

Unoriented node interface.

UNode is an interface for unoriented nodes aimed to build unoriented graphs.

In these classes we choose to use int for positions rathed than size_t because negative positions are used in some implementations to distinguish between two types of neighbors in operator[].

See also
bpp::ONode
Author
Sylvain Gaillard

Definition at line 61 of file UNode.h.

Member Function Documentation

◆ clone()

UNode* bpp::UNode::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::Clonable.

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

◆ degree()

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

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

Implemented in bpp::BasicTNode.

◆ getNeighbor() [1/2]

virtual const UNode* bpp::UNode::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.

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

◆ getNeighbor() [2/2]

virtual UNode* bpp::UNode::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.

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

◆ operator[]() [1/2]

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

Direct access to a neighbor in const context.

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

◆ operator[]() [2/2]

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

Direct access to a neighbor.

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


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