Constructor
new Sampler(group)
Create a new Sampler
Name | Type | Description |
---|---|---|
group | RangeGroup | the range group whose ranges we should sample from; it should be normalized and non-empty |
- Source
Members
type :RangeType
Range type to use for sampling, taken from the originating RangeGroup
- Source
Methods
sample(iopt, nullable) → {any}
Draw a sample. This uses binary search (O(log(N))
) to find an appropriate range, before calling RangeType.sample to fetch the actual sample
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
i | number | <optional> <nullable> | null | Number between |
- Source
randomly drawn sample
- Type:
- any