Struct Output<T>
Target interface for tokenization components.
Inherited Members
Namespace: Unity.InferenceEngine.Tokenization
Assembly: Unity.InferenceEngine.Tokenization.dll
Syntax
public readonly ref struct Output<T>
Type Parameters
| Name | Description |
|---|---|
| T | Type of the data to store. |
Constructors
Output(Action<T>, Func<T, T>)
Initializes a new instance of the Output<T> type.
Declaration
public Output(Action<T> add, Func<T, T> transform = null)
Parameters
| Type | Name | Description |
|---|---|---|
| Action<T> | add | The method to call when adding a new |
| Func<T, T> | transform | An optional transform method. Common implementation is cloning the value. |
Methods
Add(T)
Adds a new value.
Declaration
public void Add(T item)
Parameters
| Type | Name | Description |
|---|---|---|
| T | item | The value to add. |
AddRange(IEnumerable<T>)
Adds a collection of values.
Declaration
public void AddRange(IEnumerable<T> items)
Parameters
| Type | Name | Description |
|---|---|---|
| IEnumerable<T> | items | The values to add. |