edu.uci.eecs.doc.cascade.graph
Class VertexIDProvider

java.lang.Object
  extended by org.jgrapht.ext.IntegerNameProvider<Vertex>
      extended by edu.uci.eecs.doc.cascade.graph.VertexIDProvider
All Implemented Interfaces:
VertexNameProvider<Vertex>

public class VertexIDProvider
extends IntegerNameProvider<Vertex>

Generates unique IDs for vertices in a control flow graph.

Author:
Trevor Harmon

Constructor Summary
VertexIDProvider()
           
 
Method Summary
 String getVertexName(Vertex vertex)
          Generates an ID corresponding to the given vertex of a control flow graph.
 
Methods inherited from class org.jgrapht.ext.IntegerNameProvider
clear
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

VertexIDProvider

public VertexIDProvider()
Method Detail

getVertexName

public String getVertexName(Vertex vertex)
Generates an ID corresponding to the given vertex of a control flow graph. The entry and exit vertices have special IDs ("S" and "T"); all others are given an arbitrary number.

Specified by:
getVertexName in interface VertexNameProvider<Vertex>
Overrides:
getVertexName in class IntegerNameProvider<Vertex>
Parameters:
vertex - a vertex in the control flow graph
Returns:
the ID of the vertex