Package jsl.utilities.statistic
Class HalfWidthSequentialSampler
- java.lang.Object
-
- jsl.utilities.statistic.HalfWidthSequentialSampler
-
public class HalfWidthSequentialSampler extends java.lang.Object
Continually gets the value of the supplied GetValueIfc in the run() until the supplied sampling half-width requirement is met or the default maximum number of iterations is reached, whichever comes first.
-
-
Field Summary
Fields Modifier and Type Field Description protected double
myDefaultDesiredHW
protected long
myDefaultMaxIterations
protected Statistic
myStatistic
-
Constructor Summary
Constructors Constructor Description HalfWidthSequentialSampler()
HalfWidthSequentialSampler(java.lang.String name)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description double
getDefaultDesiredHalfWidth()
long
getDefaultMaxIterations()
StatisticAccessorIfc
getStatistic()
boolean
run(GetValueIfc v)
boolean
run(GetValueIfc v, double hw)
boolean
run(GetValueIfc v, double dhw, long maxIter)
void
setConfidenceLevel(double alpha)
void
setDefaultDesiredHalfWidth(double hw)
void
setDefaultMaxIterations(long maxIter)
-
-
-
Field Detail
-
myDefaultDesiredHW
protected double myDefaultDesiredHW
-
myDefaultMaxIterations
protected long myDefaultMaxIterations
-
myStatistic
protected Statistic myStatistic
-
-
Method Detail
-
getDefaultDesiredHalfWidth
public final double getDefaultDesiredHalfWidth()
-
getDefaultMaxIterations
public final long getDefaultMaxIterations()
-
setConfidenceLevel
public void setConfidenceLevel(double alpha)
-
setDefaultDesiredHalfWidth
public final void setDefaultDesiredHalfWidth(double hw)
-
setDefaultMaxIterations
public final void setDefaultMaxIterations(long maxIter)
-
getStatistic
public StatisticAccessorIfc getStatistic()
-
run
public final boolean run(GetValueIfc v)
-
run
public final boolean run(GetValueIfc v, double hw)
-
run
public boolean run(GetValueIfc v, double dhw, long maxIter)
-
-