Package ai.promoted.delivery.client
Class SamplerImpl
- java.lang.Object
-
- ai.promoted.delivery.client.SamplerImpl
-
-
Constructor Summary
Constructors Constructor Description SamplerImpl()SamplerImpl(Random rand)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleansampleRandom(float threshold)Simple random sampling that selects below the given threshold.
-
-
-
Constructor Detail
-
SamplerImpl
public SamplerImpl()
-
SamplerImpl
public SamplerImpl(Random rand)
-
-
Method Detail
-
sampleRandom
public boolean sampleRandom(float threshold)
Description copied from interface:SamplerSimple random sampling that selects below the given threshold.- Specified by:
sampleRandomin interfaceSampler- Parameters:
threshold- the sampling percentage in the range [0, 1].- Returns:
- true if we should sample in, false if we should sample out.
-
-