您最多选择25个主题 主题必须以中文或者字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

44 行
1.3 KiB

using System;
using Unity.Collections;
using Unity.Jobs;
using UnityEngine;
namespace UnityEngine.Perception.Randomization.Samplers
{
/// <summary>
/// Generates random values from probability distributions
/// </summary>
public interface ISampler
{
/// <summary>
/// Resets a sampler's state to its base random seed
/// </summary>
void ResetState();
/// <summary>
/// Resets a sampler's state to its base random seed and then offsets said seed using an index value
/// </summary>
/// <param name="index">
/// Often a the active scenario's currentIteration
/// </param>
void ResetState(int index);
/// <summary>
/// Deterministically offsets a sampler's state when generating values within a batched job
/// </summary>
/// <param name="batchIndex">
/// The current job index
/// </param>
void IterateState(int batchIndex);
/// <summary>
/// Generate one sample
/// </summary>
float Sample();
/// <summary>
/// Schedule a job to generate multiple samples
/// </summary>
NativeArray<float> Samples(int sampleCount, out JobHandle jobHandle);
}
}