Class CategoricalParameter<T>
Generates samples by choosing one option from a list of choices
Inherited Members
Namespace: UnityEngine.Perception.Randomization.Parameters
Assembly: solution.dll
Syntax
[Serializable]
public abstract class CategoricalParameter<T> : CategoricalParameterBase
Type Parameters
| Name | Description |
|---|---|
| T | The sample type of the categorical parameter |
Properties
| Name | Description |
|---|---|
| categories | Returns a list of the potential categories this parameter can generate |
| sampleType | The sample type generated by this parameter |
Methods
| Name | Description |
|---|---|
| GenericSample() | Generates a generic sample |
| GetCategory(int) | Returns the category stored at the specified index |
| GetCategoryCount() | Returns the number of stored categories |
| GetProbability(int) | Returns the probability value stored at the specified index |
| Sample() | Generates a sample |
| SetOptions(IEnumerable<(T, float)>) | Updates this parameter's list of categorical options |
| SetOptions(IEnumerable<T>) | Updates this parameter's list of categorical options |
| Validate() | Validates the categorical probabilities assigned to this parameter |