com.sun.electric.tool.ncc.strategy
Class StratCount

java.lang.Object
  extended by com.sun.electric.tool.ncc.strategy.Strategy
      extended by com.sun.electric.tool.ncc.strategy.StratCount

public class StratCount
extends Strategy

StratCount counts and prints a tree's content. StratCount implements a doFor method for each level in the EquivRecord tree, keeping counters of what it finds. StratCount is for debugging and program development.


Nested Class Summary
static class StratCount.Counts
           
 
Field Summary
 
Fields inherited from class com.sun.electric.tool.ncc.strategy.Strategy
CODE_ERROR, CODE_NO_CHANGE, depth, globals
 
Method Summary
 LeafList doFor(EquivRecord j)
          Method doFor(EquivRecord) processes a single EquivRecord.
 java.lang.Integer doFor(NetObject n)
          doFor(NetObject) counts Wires and Parts.
static StratCount.Counts doYourJob(NccGlobals globals)
           
 
Methods inherited from class com.sun.electric.tool.ncc.strategy.Strategy
doFor, doFor, doFor, elapsedTime, error, getDepth, offspringStats, startTime
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

doFor

public LeafList doFor(EquivRecord j)
Description copied from class: Strategy
Method doFor(EquivRecord) processes a single EquivRecord.

Overrides:
doFor in class Strategy
Parameters:
j - the EquivRecord to process
Returns:
a LeafList of the new leaf EquivRecords

doFor

public java.lang.Integer doFor(NetObject n)
doFor(NetObject) counts Wires and Parts. It computes the total and the average number of connections on a Wire and the root mean square (RMS) average number of connections. It sums the total number of connections on Parts.

Overrides:
doFor in class Strategy
Parameters:
n - the NetObject to catagorize
Returns:
null.

doYourJob

public static StratCount.Counts doYourJob(NccGlobals globals)