Tulip  4.6.0
Better Visualization Through Research
tlp::node Struct Reference

#include <Node.h>

List of all members.

Public Member Functions

 node ()
 node (unsigned int j)
bool isValid () const
 operator unsigned int () const
bool operator!= (const node n) const
bool operator== (const node n) const

Public Attributes

unsigned int id

Detailed Description

The node struct represents a node in a Graph object.

This structure only contains an identifier, and a function to check if the node is valid. A node is considered invalid when its id has the UINT_MAX value.

Most operations performed on a node (getting out edges etc) are available into the tlp::Graph object.

See also:
tlp::edge
tlp::Graph
Examples:
clique_import/cliqueimport.cpp, and graph_display/graph_display.cpp.

Definition at line 39 of file Node.h.


Constructor & Destructor Documentation

tlp::node::node ( ) [inline]

node creates an invalid node.

Definition at line 48 of file Node.h.

tlp::node::node ( unsigned int  j) [inline, explicit]

node Create a node of given identifier. It is your responsibility to make sure a node of this ID exists when you create the node. If you want to make sure this node exists, use Graph::isElement(), as isValid() will only tell is the node was correctly initialized.

Parameters:
jthe identifier this node will use.

Definition at line 57 of file Node.h.


Member Function Documentation

bool tlp::node::isValid ( ) const [inline]

isValid checks if the node is valid. An invalid node is a node whose id is UINT_MAX.

Returns:
whether the node is valid or not.

Definition at line 90 of file Node.h.

+ Here is the caller graph for this function:

tlp::node::operator unsigned int ( ) const [inline]

operator unsigned int A convenience function to get the id of a node.

Definition at line 62 of file Node.h.

bool tlp::node::operator!= ( const node  n) const [inline]

operator != Compares two nodes, checking that they are different..

Parameters:
nThe other node to compare this one to.
Returns:
Whether or not the two nodes are different.

Definition at line 71 of file Node.h.

bool tlp::node::operator== ( const node  n) const [inline]

operator != Compares two nodes, checking that they are identical.

Parameters:
nThe other node to compare this one to.
Returns:
Whether or not the two nodes are the same.

Definition at line 80 of file Node.h.


Member Data Documentation

unsigned int tlp::node::id

id The identifier of the node.

Definition at line 43 of file Node.h.

 All Classes Files Functions Variables Enumerations Enumerator Properties