bpp-core  2.1.0
bpp::UNode Class Reference

Unoriented node interface. More...

#include <Bpp/Graph/UNode.h>

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

List of all members.

Public Member Functions

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

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

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.

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

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

Implemented in bpp::BasicTNode.

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.

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.

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.

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