Class AbstractRndMonitor
java.lang.Object
io.github.olyutorskii.aletojio.idling.AbstractRndMonitor
- All Implemented Interfaces:
RndMonitor
- Direct Known Subclasses:
BunchMonitor
,ByteFreqMonitor
,PopCntMonitor
,UniqRunMonitor
Abstract
RndMonitor
implements.-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
AbstractRndMonitor
protected AbstractRndMonitor()Constructor.
-
-
Method Details
-
reset
public void reset()Reset statistical status.- Specified by:
reset
in interfaceRndMonitor
-
resetImpl
protected abstract void resetImpl()Implement ofreset()
. -
probe
public boolean probe(int iVal) Probe new random value.The statistical state of the past random sequence is recalculated.
Once the statistical condition is met, it must continue to return true until
RndMonitor.reset()
is called.- Specified by:
probe
in interfaceRndMonitor
- Parameters:
iVal
- new random value- Returns:
- true if met statistical condition
-
probeImpl
protected abstract boolean probeImpl(int iVal) Implement ofprobe(int)
.- Parameters:
iVal
- int value- Returns:
- true if
-
hasMet
public boolean hasMet()Inspect statistical condition.Must return false immediately after constructor and
RndMonitor.reset()
calls.Once
RndMonitor.probe(int)
returns true, must continue to return true untilRndMonitor.reset()
called.- Specified by:
hasMet
in interfaceRndMonitor
- Returns:
- true if met statistical condition.
-