DelegatingParameterSource<T>
Models & Types · AiDotNet.Models.Parameters
Adapts a component that already exposes count / read / write but does not implement
IParameterSource.
Implements: IParameterSource<T>
How It Works
For types the registry cannot hold directly because they sit outside the interface hierarchy –
a projector head, a helper network, an internal block. Preferable to widening those types’
interfaces when they are not ours to change; where they ARE ours, implementing
IParameterSource on them directly is cleaner and this adapter is unnecessary.
Constructors
| Constructor | Summary |
|---|---|
DelegatingParameterSource(Func<long> count, Func<Vector<T>> get, Action<Vector<T>> set) |
Creates a source from count, read and write delegates. |
Properties
| Property | Summary |
|---|---|
long ParameterCount { get; } |
Methods
| Method | Summary |
|---|---|
Vector<T> GetParameters() |
|
void SetParameters(Vector<T> parameters) |