net.sf.bddbddb.order
Class ConstraintInfo

java.lang.Object
  extended by net.sf.bddbddb.order.ConstraintInfo
All Implemented Interfaces:
java.lang.Comparable

public class ConstraintInfo
extends java.lang.Object
implements java.lang.Comparable

Information about a particular constraint.

Version:
$Id: ConstraintInfo.java 448 2005-03-07 06:58:48Z cs343 $
Author:
jwhaley

Constructor Summary
ConstraintInfo(OrderConstraint c)
          Construct a new ConstraintInfo.
 
Method Summary
 int compareTo(ConstraintInfo that)
           
 int compareTo(java.lang.Object o)
           
 void dump()
          Dump this constraint info to the screen.
static ConstraintInfo fromXMLElement(org.jdom.Element e, XMLFactory f)
           
 double getConfidenceInterval(double sigLevel)
          Returns the confidence interval of the normalized times with the given significance level.
 double getMean()
          A measure of, when using an order with this constraint, how long the operation would take versus the best time for that operation.
 double getMinimumCost()
           
 int getNumberOfTrials()
          The number of trials used in the computation of the score.
 double getStdDev()
          The standard deviation of the normalized times used in the computation of the score.
 double getVariance()
          The variance of the normalized times used in the computation of the score.
static double getVariance(java.util.Collection cis)
           
 double getWeightedMean()
          The same as the score, but each trial is weighted by the absolute time spent by the best trial of that operation.
 void registerTrial(TrialInfo t)
           
 void registerTrials(java.util.Collection newTrials)
          Register new trials with this ConstraintInfo.
 java.lang.String toString()
           
 org.jdom.Element toXMLElement(Solver solver)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ConstraintInfo

public ConstraintInfo(OrderConstraint c)
Construct a new ConstraintInfo.

Parameters:
c - constraint
Method Detail

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

getMean

public double getMean()
A measure of, when using an order with this constraint, how long the operation would take versus the best time for that operation. For example, a score of 2 would mean that on average, orders with this constraint took twice as long on an operation as the best known order for that operation. Obviously, the best possible score is 1, and lower numbers are better.


getNumberOfTrials

public int getNumberOfTrials()
The number of trials used in the computation of the score.


getVariance

public static double getVariance(java.util.Collection cis)

getVariance

public double getVariance()
The variance of the normalized times used in the computation of the score.


getStdDev

public double getStdDev()
The standard deviation of the normalized times used in the computation of the score.


getWeightedMean

public double getWeightedMean()
The same as the score, but each trial is weighted by the absolute time spent by the best trial of that operation. This means that operations that took longer will be weighted in this score more heavily.


getMinimumCost

public double getMinimumCost()

getConfidenceInterval

public double getConfidenceInterval(double sigLevel)
Returns the confidence interval of the normalized times with the given significance level.


registerTrial

public void registerTrial(TrialInfo t)

registerTrials

public void registerTrials(java.util.Collection newTrials)
Register new trials with this ConstraintInfo.


compareTo

public int compareTo(java.lang.Object o)
Specified by:
compareTo in interface java.lang.Comparable

compareTo

public int compareTo(ConstraintInfo that)

dump

public void dump()
Dump this constraint info to the screen.


toXMLElement

public org.jdom.Element toXMLElement(Solver solver)

fromXMLElement

public static ConstraintInfo fromXMLElement(org.jdom.Element e,
                                            XMLFactory f)


Copyright © 2004-2008 Stanford SUIF Compiler Group. All Rights Reserved.