org.jikesrvm.compilers.opt.util
Interface GraphNode

All Superinterfaces:
GraphElement
All Known Subinterfaces:
DF_LatticeCell
All Known Implementing Classes:
AnnotatedLSTNode, BasicBlock, CoalesceGraph.Node, DepGraphNode, DF_AbstractCell, DF_Equation, DominatorCell, ExceptionHandlerBasicBlock, IndexPropagation.ArrayCell, IndexPropagation.ObjectCell, LSTNode, SortedGraphNode, SpaceEffGraphNode, ValueGraphVertex

public interface GraphNode
extends GraphElement

A generic interface for graph nodes. All graph utilities should be defined in terms of this interface, and all graph implementations should make sure their nodes implement this interface.

See Also:
Graph, GraphEdge, GraphUtilities

Method Summary
 int getIndex()
          The index of this node in its graph.
 GraphNodeEnumeration inNodes()
          Get an enumeration of all the edges at which edges that point to this node are sourced.
 GraphNodeEnumeration outNodes()
          Get an enumeration of all the edges to which edges sourced at this node point.
 void setIndex(int i)
           
 
Methods inherited from interface org.jikesrvm.compilers.opt.util.GraphElement
getScratch, setScratch
 

Method Detail

outNodes

GraphNodeEnumeration outNodes()
Get an enumeration of all the edges to which edges sourced at this node point.

Returns:
an enumeration of all the edges to which edges sourced at this node point.

inNodes

GraphNodeEnumeration inNodes()
Get an enumeration of all the edges at which edges that point to this node are sourced.

Returns:
an enumeration of all the edges at which edges that point to this node are sourced.

getIndex

int getIndex()
The index of this node in its graph. In general, this can e anarbitrary number, but after a call to Graph.compactNodeNumbering the nodes of a graph should be numbered 0 thru (# of nodes in graph - 1).

Returns:
the index of this node in its graph.

setIndex

void setIndex(int i)