Home | Documentation | Download | Platforms | Projects | Mailing Lists | Version History

- Main Page
- Classes
- Files
- Related Pages

- Alphabetical List
- Class List
- Class Hierarchy
- Class Members

# node Class Reference

A node in a graph. More...

Collaboration diagram for node:

[legend]

List of all members.

## Public Member Functions

| node ()
int | degree () const
int | outdeg () const
int | indeg () const
const node & | opposite (edge e) const
bool | is_hidden () const
int | excentricity () const
adj_nodes_iterator | adj_nodes_begin () const
adj_nodes_iterator | adj_nodes_end () const
adj_edges_iterator | adj_edges_begin () const
adj_edges_iterator | adj_edges_end () const
in_edges_iterator | in_edges_begin () const
in_edges_iterator | in_edges_end () const
out_edges_iterator | out_edges_begin () const
out_edges_iterator | out_edges_end () const
inout_edges_iterator | inout_edges_begin () const
inout_edges_iterator | inout_edges_end () const

## Friends

class | graph
class | edge

## Detailed Description

A node in a graph.

Iterator for adjacent nodes of a node.

Iterator for all incident edges of a node.

Iterator for adjacent edges of a node.

## Constructor & Destructor Documentation

node::node | ( |  | ) |

Default constructor. Creates an invalid node. The only way to obtain a valid node is through graph::new_node Example:

       graph g;
       node n;

       n = g.new_node();

See also:
  graph::new_node

## Member Function Documentation

int node::degree | ( |  | ) | const

Returns the degree of the node, i. e. node::outdeg + node::indeg .

int node::outdeg | ( |  | ) | const

Returns the out degree of the node, i. e. the number of outgoing edges.

int node::indeg | ( |  | ) | const

Returns the in degree of the node, i. e. the number of incoming edges.

const node& node::opposite | ( | edge | e | ) | const

Returns the node on the opposite side of `e`.

Parameters:

  | e | an edge incident to the node

bool node::is_hidden | ( |  | ) | const

Returns true iff node is hidden.

Returns:
  true iff node is hidden.

See also:
  graph::hide_edge

  graph::restore_edge

int node::excentricity | ( |  | ) | const

Returns the excentricity of the node, i.e. the maximum graph-theoretic distance to another node

Returns:
  excentricity of node.

adj_nodes_iterator node::adj_nodes_begin | ( |  | ) | const

Iterate through all adjacent nodes.

Returns:
  start for iteration through all adjacent nodes

adj_nodes_iterator node::adj_nodes_end | ( |  | ) | const

Iterate through all adjacent nodes.

Returns:
  end for iteration through all adjacent nodes

adj_edges_iterator node::adj_edges_begin | ( |  | ) | const

Iterate through all adjacent edges.

Returns:
  start for iteration through all adjacent edges

adj_edges_iterator node::adj_edges_end | ( |  | ) | const

Iterate through all adjacent edges.

Returns:
  end for iteration through all adjacent edges

in_edges_iterator node::in_edges_begin | ( |  | ) | const

Iterate through all incoming edges.

Returns:
  start for iteration through all incoming edges

in_edges_iterator node::in_edges_end | ( |  | ) | const

Iterate through all incoming edges.

Returns:
  end for iteration through all incoming edges

out_edges_iterator node::out_edges_begin | ( |  | ) | const

Iterate through all outgoing edges.

Returns:
  start for iteration through all outgoing edges

out_edges_iterator node::out_edges_end | ( |  | ) | const

Iterate through all outgoing edges.

Returns:
  end for iteration through all outgoing edges

inout_edges_iterator node::inout_edges_begin | ( |  | ) | const

Iterate through all incoming and outgoing edges.

Returns:
  start for iteration through all incoming and outgoing edges

inout_edges_iterator node::inout_edges_end | ( |  | ) | const

Iterate through all incoming and outgoing edges.

Returns:
  end for iteration through all incoming and outgoing edges

University of Passau - FMI - Theoretical Computer Science

Design © 2002, 2003 Marcus Raitner, University of Passau