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
{
///
/// The base seed used to initialize this sampler's state
///
uint baseSeed { get; set; }
///
/// The current random state of this sampler
///
uint state { get; set; }
///
/// A range bounding the values generated by this sampler
///
FloatRange range { get; set; }
///
/// Resets a sampler's state to its base random seed
///
void ResetState();
///
/// Deterministically offsets a sampler's state when generating values within a batched job
///
///
/// The index used to offset the sampler's state.
/// Typically set to either the current scenario iteration or a job's batch index.
///
void IterateState(int offsetIndex);
///
/// 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);
}
}