|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.sourceforge.combean.graph.alg.partition.NodeNumberingAsPartitionVisitor
public class NodeNumberingAsPartitionVisitor
Use a node numbering to store the partition numbers. Counting of the partitions starts from 1;
Constructor Summary | |
---|---|
NodeNumberingAsPartitionVisitor(NodeNumbering numbering)
Constructor |
Method Summary | |
---|---|
void |
addNode(Node v)
Has to be invoked exactly once for all nodes of the graph, properly enclosed by calls to start/endPartition(). |
void |
endPartition()
Has to be invoked after all calls to addNode of a partition. |
void |
finish()
Has to be invoked after processing of the ParititioningAlg is complete. |
int |
getNumPartitions()
Get the number of partitions found. |
void |
init(Graph g)
Has to be invoked before the actual processing of the PartitioningAlg starts. |
void |
startPartition()
Has to be invoked before all calls to addNode of a partition. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public NodeNumberingAsPartitionVisitor(NodeNumbering numbering)
numbering
- the numbering to be used for storing the partitions.Method Detail |
---|
public void init(Graph g)
NodePartitionVisitor
init
in interface NodePartitionVisitor
g
- the graph which shall be processed.public void startPartition()
NodePartitionVisitor
startPartition
in interface NodePartitionVisitor
public void addNode(Node v)
NodePartitionVisitor
addNode
in interface NodePartitionVisitor
v
- a node which belongs to the current partition, started with
a call to startPartition().public void endPartition()
NodePartitionVisitor
endPartition
in interface NodePartitionVisitor
public void finish()
NodePartitionVisitor
finish
in interface NodePartitionVisitor
public int getNumPartitions()
NodePartitionVisitor
getNumPartitions
in interface NodePartitionVisitor
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |