Interface ISampler
Generates random values from probability distributions
Namespace: UnityEngine.Perception.Randomization.Samplers
Syntax
public interface ISampler
Properties
maxAllowed
The largest value this sampler should output
Declaration
float maxAllowed { get; set; }
Property Value
Type | Description |
---|---|
Single |
minAllowed
The smallest value this sampler should output
Declaration
float minAllowed { get; set; }
Property Value
Type | Description |
---|---|
Single |
shouldCheckValidRange
Whether the provided minAllowed and maxAllowed values should be used to validate this sampler.
Declaration
bool shouldCheckValidRange { get; set; }
Property Value
Type | Description |
---|---|
Boolean |
Methods
CheckAgainstValidRange()
Check that the provided values adhere to the minAllowed and maxAllowed outputs for this sampler.
Declaration
void CheckAgainstValidRange()
Sample()
Generates one sample
Declaration
float Sample()
Returns
Type | Description |
---|---|
Single | The generated sample |
Validate()
Validates that the sampler is configured properly
Declaration
void Validate()