bb.science
Class Bootstrap.UnitTest.CoverageResult

java.lang.Object
  extended by bb.science.Bootstrap.UnitTest.CoverageResult
Enclosing class:
Bootstrap.UnitTest

private static class Bootstrap.UnitTest.CoverageResult
extends Object

Accumulates the results of running many individual Bootstrap.UnitTest.CoverageTasks. Using an instance of this class allows you to avoid having to retain references to all the CoverageTasks that you would otherwise have to do if want sum up their results once all have finished executing. Since this instance uses little memory, while there may be huge numbers of CoverageTasks, this is a big memory savings.

This class is multithread safe: every method is synchronized.


Nested Class Summary
private static class Bootstrap.UnitTest.CoverageResult.Metrics
          This class is NOT multithread safe: it expects its enclosing class to guard access to it.
 
Field Summary
private  Map<Bootstrap.Estimator,Bootstrap.UnitTest.CoverageResult.Metrics> estimatorToMetrics
           
private  String prefix
           
private  Bootstrap.UnitTest.CoverageTask taskFirst
           
 
Constructor Summary
private Bootstrap.UnitTest.CoverageResult(String prefix)
           
 
Method Summary
private  String getAnswer()
           
private  Bootstrap.UnitTest.CoverageResult.Metrics getMetrics(Bootstrap.Estimator estimator)
           
private  double getValueTrue(Bootstrap.Estimator estimator, Bootstrap.UnitTest.Distribution distribution)
           
private  void include(Bootstrap.UnitTest.CoverageTask task, Map<Bootstrap.Estimator,Bootstrap.Estimate> estimatorToEstimate)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

estimatorToMetrics

private final Map<Bootstrap.Estimator,Bootstrap.UnitTest.CoverageResult.Metrics> estimatorToMetrics

prefix

private final String prefix

taskFirst

private Bootstrap.UnitTest.CoverageTask taskFirst
Constructor Detail

Bootstrap.UnitTest.CoverageResult

private Bootstrap.UnitTest.CoverageResult(String prefix)
Method Detail

include

private void include(Bootstrap.UnitTest.CoverageTask task,
                     Map<Bootstrap.Estimator,Bootstrap.Estimate> estimatorToEstimate)
              throws IllegalArgumentException
Throws:
IllegalArgumentException

getValueTrue

private double getValueTrue(Bootstrap.Estimator estimator,
                            Bootstrap.UnitTest.Distribution distribution)
                     throws IllegalStateException
Throws:
IllegalStateException

getMetrics

private Bootstrap.UnitTest.CoverageResult.Metrics getMetrics(Bootstrap.Estimator estimator)

getAnswer

private String getAnswer()