public class EquivRecord extends java.lang.Object implements EquivRecReport.EquivRecReportable
A Leaf EquivRecord is "balanced" if all Circuits have the same number of NetObjects. "Matched" means balanced with each Circuit having one NetObject. "Mismatched" means unbalanced with some some Circuit having no NetObject. "Active" means not matched and not mismatched.
Modifier and Type | Method and Description |
---|---|
void |
addCircuit(Circuit c)
Add a new Circuit to EquivRecord
|
LeafList |
apply(Strategy js)
The apply method applies a Strategy to this leaf EquivRecord.
|
void |
checkMe(EquivRecord parent)
Sanity check
|
java.util.Iterator<Circuit> |
getCircuits() |
int |
getCode()
getCode returns the fixed hash code for this object.
|
void |
getNetObjReportablesFromEntireTree(java.util.List<java.util.List<NetObjReport.NetObjReportable>> matched,
java.util.List<java.util.List<NetObjReport.NetObjReportable>> notMatched) |
void |
getNetObjsFromEntireTree(java.util.List<java.util.List<NetObject>> matched,
java.util.List<java.util.List<NetObject>> notMatched)
Get all NetObjects contained by an EquivRecord subtree.
|
NetObject.Type |
getNetObjType()
say whether this leaf record contains Parts, Wires, or Ports.
|
java.util.Iterator<EquivRecord> |
getOffspring()
get offspring of internal record
|
EquivRecord |
getParent() |
java.lang.String |
getPartitionReason() |
java.util.List<java.lang.String> |
getPartitionReasonsFromRootToMe() |
int |
getValue()
get the value that a strategy used to distinguish
this EquivRecord.
|
boolean |
isActive()
isActive indicates that this leaf record is neither matched
nor mismatched.
|
boolean |
isBalanced() |
boolean |
isLeaf() |
boolean |
isMatched()
isMatched is a special case of balanced.
|
boolean |
isMismatched()
isMismatched is a special case of unbalanced.
|
int |
maxSize()
maxSize returns the number of NetObjects in the most populous
Circuit.
|
int |
maxSizeDiff()
maxSizeDiff computes the difference in the number of
NetObjects in the Circuits of this leaf record.
|
java.lang.String |
nameString()
nameString returns a String of type and name for this parent.
|
static EquivRecord |
newLeafRecord(int key,
java.util.List<Circuit> ckts,
NccGlobals globals)
Construct a leaf EquivRecord that holds circuits
|
static EquivRecord |
newRootRecord(java.util.List<EquivRecord> offspring)
Construct an internal EquivRecord that will serve as the root of the
EquivRecord tree
|
int |
numCircuits() |
int |
numNetObjs()
Get total number of NetObjects in all Circuits of a leaf record
|
int |
numOffspring() |
void |
setParent(EquivRecord x)
Set my parent to be x
|
void |
setPartitionReason(java.lang.String s)
The fixed strategies annotate EquivRecords with comments
describing what characteristic made this EquivRecord unique.
|
void |
setWireSignature(LocalPartitionWires.Signature sig) |
java.lang.String |
sizeString()
generates a String indicating the size of the
Circuits in this leaf record
|
public EquivRecord getParent()
public int getCode()
public void checkMe(EquivRecord parent)
public void setParent(EquivRecord x)
public int getValue()
public java.util.Iterator<Circuit> getCircuits()
public int numCircuits()
public void addCircuit(Circuit c)
public NetObject.Type getNetObjType()
public int numNetObjs()
public java.lang.String sizeString()
public int maxSizeDiff()
public int maxSize()
public boolean isActive()
public boolean isBalanced()
public boolean isMatched()
public boolean isMismatched()
public java.util.Iterator<EquivRecord> getOffspring()
public int numOffspring()
public LeafList apply(Strategy js)
js
- the Strategy to applypublic java.lang.String nameString()
public boolean isLeaf()
public void setPartitionReason(java.lang.String s)
public java.lang.String getPartitionReason()
public java.util.List<java.lang.String> getPartitionReasonsFromRootToMe()
getPartitionReasonsFromRootToMe
in interface EquivRecReport.EquivRecReportable
public void setWireSignature(LocalPartitionWires.Signature sig)
public static EquivRecord newLeafRecord(int key, java.util.List<Circuit> ckts, NccGlobals globals)
ckts
- Circuits belonging to Equivalence Recordglobals
- used for generating random numberspublic static EquivRecord newRootRecord(java.util.List<EquivRecord> offspring)
offspring
- public void getNetObjsFromEntireTree(java.util.List<java.util.List<NetObject>> matched, java.util.List<java.util.List<NetObject>> notMatched)
matched
- list of list of NetObjects from matched EquivRecords
indexed as: [circuitIndex][netObjectIndex]. NetObjects at the same
index in each list match.notMatched
- list of list of NetObjects from not matched
EquivRecords indexed as [circuitIndex][netObjectIndex]public void getNetObjReportablesFromEntireTree(java.util.List<java.util.List<NetObjReport.NetObjReportable>> matched, java.util.List<java.util.List<NetObjReport.NetObjReportable>> notMatched)
getNetObjReportablesFromEntireTree
in interface EquivRecReport.EquivRecReportable