public class DF_Equation extends Object implements GraphNode
Modifier and Type | Field and Description |
---|---|
private int |
index
Field used for GraphNode interface.
|
protected DF_LatticeCell[] |
operands
The operands.
|
protected DF_Operator |
operator
The operator in the equation
|
(package private) int |
topologicalNumber
The number of this equation when the system is sorted in topological
order.
|
Constructor and Description |
---|
DF_Equation(DF_LatticeCell lhs,
DF_Operator operator,
DF_LatticeCell op1)
Constructor for case of one operand on the right-hand side.
|
DF_Equation(DF_LatticeCell lhs,
DF_Operator operator,
DF_LatticeCell[] rhs)
Constructor for case of more than three operands on the right-hand side.
|
DF_Equation(DF_LatticeCell lhs,
DF_Operator operator,
DF_LatticeCell op1,
DF_LatticeCell op2)
Constructor for case of two operands on the right-hand side.
|
DF_Equation(DF_LatticeCell lhs,
DF_Operator operator,
DF_LatticeCell op1,
DF_LatticeCell op2,
DF_LatticeCell op3)
Constructor for case of three operands on the right-hand side.
|
Modifier and Type | Method and Description |
---|---|
(package private) boolean |
evaluate()
Evaluate this equation, setting a new value for the
left-hand side.
|
int |
getIndex()
The index of this node in its graph.
|
(package private) DF_LatticeCell |
getLHS()
Return the left-hand side of this equation.
|
DF_LatticeCell[] |
getOperands()
Return the operands in this equation.
|
(package private) DF_Operator |
getOperator()
Return the operator for this equation
|
(package private) int |
getTopologicalNumber()
Get the topological number for this equation
|
boolean |
hasCell(DF_LatticeCell cell)
Does this equation contain an appearance of a given cell?
|
Enumeration<GraphNode> |
inNodes()
Return an enumeration of the equations upon whose results this
equation depends.
|
Enumeration<GraphNode> |
outNodes()
Return an enumeration of the equations which use the result of this
equation.
|
void |
setIndex(int i)
Implementation of GraphNode interface.
|
(package private) void |
setTopologicalNumber(int n)
Get the topological number for this equation
|
String |
toString()
Return a string representation of this object
|
protected final DF_Operator operator
protected final DF_LatticeCell[] operands
int topologicalNumber
private int index
DF_Equation(DF_LatticeCell lhs, DF_Operator operator, DF_LatticeCell op1)
lhs
- the lattice cell set by this equationoperator
- the equation operatorop1
- the first operand on the rhsDF_Equation(DF_LatticeCell lhs, DF_Operator operator, DF_LatticeCell op1, DF_LatticeCell op2)
lhs
- the lattice cell set by this equationoperator
- the equation operatorop1
- the first operand on the rhsop2
- the second operand on the rhsDF_Equation(DF_LatticeCell lhs, DF_Operator operator, DF_LatticeCell op1, DF_LatticeCell op2, DF_LatticeCell op3)
lhs
- the lattice cell set by this equationoperator
- the equation operatorop1
- the first operand on the rhsop2
- the second operand on the rhsop3
- the third operand on the rhsDF_Equation(DF_LatticeCell lhs, DF_Operator operator, DF_LatticeCell[] rhs)
lhs
- the lattice cell set by this equationoperator
- the equation operatorrhs
- the operands of the right-hand side in orderboolean evaluate()
true
if the lhs value changed. false
otherwiseDF_LatticeCell getLHS()
public DF_LatticeCell[] getOperands()
DF_Operator getOperator()
public boolean hasCell(DF_LatticeCell cell)
cell
- the cell in questionint getTopologicalNumber()
void setTopologicalNumber(int n)
n
- the topological orderpublic 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).public Enumeration<GraphNode> outNodes()
public Enumeration<GraphNode> inNodes()