public abstract class DF_AbstractCell extends Object implements DF_LatticeCell
Modifier and Type | Field and Description |
---|---|
private HashSet<DF_Equation> |
defs
Set of DF_Equations which define this lattice cell.
|
private int |
index
Field used for GraphNode interface.
|
private HashSet<DF_Equation> |
uses
Set of DF_Equations which use this lattice cell.
|
Constructor and Description |
---|
DF_AbstractCell()
Default Constructor
|
DF_AbstractCell(int capacity)
This constructor bounds the initial capacity to save space.
|
Modifier and Type | Method and Description |
---|---|
void |
addDef(DF_Equation eq)
Note that this variable appears on the LHS of an equation
|
void |
addUse(DF_Equation eq)
Note that this variable appears on the RHS of an equation
|
Iterator<DF_Equation> |
getDefs()
Returns an enumeration of the equations in which this
lattice cell is defined.
|
int |
getIndex()
The index of this node in its graph.
|
Iterator<DF_Equation> |
getUses()
Returns an enumeration of the equations in which this
lattice cell is used.
|
Enumeration<GraphNode> |
inNodes()
Get an enumeration of all the edges at which edges that point
to this node are sourced.
|
Enumeration<GraphNode> |
outNodes()
Get an enumeration of all the edges to which edges sourced at
this node point.
|
void |
setIndex(int i)
Implementation of GraphNode interface.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
toString
private final HashSet<DF_Equation> uses
private final HashSet<DF_Equation> defs
private int index
public DF_AbstractCell()
public DF_AbstractCell(int capacity)
capacity
- the initial capacity of the "uses" setpublic Iterator<DF_Equation> getUses()
DF_LatticeCell
getUses
in interface DF_LatticeCell
public Iterator<DF_Equation> getDefs()
DF_LatticeCell
getDefs
in interface DF_LatticeCell
public void addUse(DF_Equation eq)
DF_LatticeCell
addUse
in interface DF_LatticeCell
eq
- the equationpublic void addDef(DF_Equation eq)
DF_LatticeCell
addDef
in interface DF_LatticeCell
eq
- the equationpublic Enumeration<GraphNode> inNodes()
GraphNode
public Enumeration<GraphNode> outNodes()
GraphNode
public void setIndex(int i)
public int getIndex()
GraphNode
Graph.compactNodeNumbering
the nodes of a graph should be
numbered 0 thru (# of nodes in graph - 1).