net.sourceforge.combean.interfaces.graph.containers
Interface NodeNumbering

Package class diagram package NodeNumbering
All Known Implementing Classes:
ArrayNodeNumbering, MapAsNodeNumbering

public interface NodeNumbering

A data structure which maps nodes to integers.


Method Summary
 void fill(int num)
          Set the node number of all nodes to a given value.
 int getNumber(Node v)
          Get the number of a single node.
 void init(Graph g)
          Has to be invoked before the data structure can be used.
 void setNumber(Node v, int num)
          Set the number of a single node.
 

Method Detail

init

void init(Graph g)
Has to be invoked before the data structure can be used. The data structure may only be used with nodes belonging to the given graph. After init() the content of the NodeNumbering is still undefined. Use fill if you want to define it.

Parameters:
g - the graph for which the NodeNumbering shall be defined.

fill

void fill(int num)
Set the node number of all nodes to a given value.

Parameters:
num - the value which shall be set.

setNumber

void setNumber(Node v,
               int num)
Set the number of a single node.

Parameters:
v - the node
num - the number to be set

getNumber

int getNumber(Node v)
Get the number of a single node.

Parameters:
v -
Returns:
the number of v