using System; using Unity.Collections; using Unity.Jobs; using UnityEngine; namespace UnityEngine.Experimental.Perception.Randomization.Samplers { /// /// Generates random values from probability distributions /// public interface ISampler { /// /// A range bounding the values generated by this sampler /// FloatRange range { get; set; } /// /// Generates one sample /// /// The generated sample float Sample(); /// /// Schedules a job to generate an array of samples /// /// The number of samples to generate /// The handle of the scheduled job /// A NativeArray of generated samples NativeArray Samples(int sampleCount, out JobHandle jobHandle); /// /// Used for performing sampler specific clean-up tasks (e.g. once the scenario is complete). /// void Cleanup(); /// /// Used for performing sampler specific initialization tasks. /// void Initialize(); } }