Interface ObjectSampler<T>
- Type Parameters:
T- Type of the sample.
- All Known Subinterfaces:
SharedStateObjectSampler<T>
- All Known Implementing Classes:
BoxSampler, CollectionSampler, CombinationSampler, DirichletSampler, DiscreteProbabilityCollectionSampler, LineSampler, PermutationSampler, TetrahedronSampler, TriangleSampler, UnitBallSampler, UnitSphereSampler
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
Sampler that generates values of a specified type.
- Since:
- 1.4
-
Method Summary
-
Method Details
-
sample
-
samples
-
samples
Returns a stream producing the givenstreamSizenumber of object sample values.The default implementation produces a sequential stream that repeatedly calls
sample(); the stream is limited to the givenstreamSize.- Parameters:
streamSize- Number of values to generate.- Returns:
- a stream of object values.
- Since:
- 1.5
-