Class ParameterDefinition
- Namespace
- SignalSharp.Optimization
- Assembly
- SignalSharp.dll
Defines a parameter to be optimized, including its bounds and an optional initial guess. This structure is intended to be general for various optimization algorithms.
public record ParameterDefinition : IEquatable<ParameterDefinition>
- Inheritance
-
ParameterDefinition
- Implements
- Inherited Members
Remarks
Instances are validated on construction: the name must be non-empty and the bounds must be finite with MinValue not greater than MaxValue.
Constructors
ParameterDefinition(string, double, double, double?)
Defines a parameter to be optimized, including its bounds and an optional initial guess.
public ParameterDefinition(string Name, double MinValue, double MaxValue, double? InitialGuess = null)
Parameters
NamestringThe unique name of the parameter (e.g., "Alpha", "Beta").
MinValuedoubleThe minimum allowed value for the parameter (lower bound).
MaxValuedoubleThe maximum allowed value for the parameter (upper bound).
InitialGuessdouble?An optional initial guess for the parameter, typically within the bounds. Crucial for iterative optimizers; values outside the bounds are clamped by the optimizers.
Exceptions
- ArgumentNullException
Thrown when
Nameis null.- ArgumentException
Thrown when
Nameis empty or whitespace.- ArgumentOutOfRangeException
Thrown when the bounds are not finite, when
MinValueis greater thanMaxValue, or whenInitialGuessis not finite.
Properties
InitialGuess
An optional initial guess for the parameter, typically within the bounds. Crucial for iterative optimizers.
public double? InitialGuess { get; init; }
Property Value
MaxValue
The maximum allowed value for the parameter (upper bound).
public double MaxValue { get; init; }
Property Value
MinValue
The minimum allowed value for the parameter (lower bound).
public double MinValue { get; init; }
Property Value
Name
The unique name of the parameter (e.g., "Alpha", "Beta").
public string Name { get; init; }