ix.iplan
Class SlipStats

java.lang.Object
  extended by ix.iplan.SlipStats
All Implemented Interfaces:
PlanStats

public class SlipStats
extends java.lang.Object
implements PlanStats

Gathers or caculates various statistics for the Slip algorithm.


Constructor Summary
SlipStats(Slip slip)
           
 
Method Summary
 void addStats(PlanStats planStats)
          Increments, or otherwise modifies, the values in this object using values from the specified PlanStats object.
 void altPicked()
           
 void altPosted()
           
 int calcLongestPathLength()
           
 int calcLongestPathLength(java.util.List nodeEnds)
           
 void incrementStat(java.lang.String key)
           
 void recordStat(java.lang.String key, java.lang.Object value)
          Records a statistic.
 void report(java.io.PrintStream out)
          Prints a plain text description of the statistics and their values.
 void stepTaken()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SlipStats

public SlipStats(Slip slip)
Method Detail

stepTaken

public void stepTaken()

altPosted

public void altPosted()

altPicked

public void altPicked()

recordStat

public void recordStat(java.lang.String key,
                       java.lang.Object value)
Description copied from interface: PlanStats
Records a statistic. The value is typically an Integer. There is no requirement that planners record all statistics using this method; it is public primarily so that things that use a planner can add some statistics of their own.

Specified by:
recordStat in interface PlanStats

incrementStat

public void incrementStat(java.lang.String key)

addStats

public void addStats(PlanStats planStats)
Description copied from interface: PlanStats
Increments, or otherwise modifies, the values in this object using values from the specified PlanStats object. A typical use is to keep running totals, and it is required that PlanStats objects returned from the same planner can be used in that way.

The two PlanStats objects involved when this method is called normally have to agree about value classes. Different statistics may have different value classes. Classes that implement PlanStats are free to combine the values in any way they want, and for a numeric statistic, the combined value does not have to be a straight sum.

Specified by:
addStats in interface PlanStats

report

public void report(java.io.PrintStream out)
Description copied from interface: PlanStats
Prints a plain text description of the statistics and their values.

Specified by:
report in interface PlanStats

calcLongestPathLength

public int calcLongestPathLength()

calcLongestPathLength

public int calcLongestPathLength(java.util.List nodeEnds)