Kernel Constructor
Definition
Namespace: Numerics.NET.Statistics
Assembly: Numerics.NET (in Numerics.NET.dll) Version: 10.9.0
Assembly: Numerics.NET (in Numerics.NET.dll) Version: 10.9.0
Overload List
| Kernel( | Constructs a kernel with an ordinary evaluation function. |
| Kernel( | Constructs a kernel with an explicit logarithmic evaluation function. |
Kernel(Func<Double, Double>, Interval<Double>, Double, Int32)
Constructs a kernel with an ordinary evaluation function.
public Kernel(
Func<double, double> kernelFunction,
Interval<double> domain,
double norm = NaN,
int order = 2
)Parameters
Remarks
A NaN normalization requests numerical integration. Logarithmic evaluation uses the logarithm
of this function; a separate log delegate can be supplied through the other constructor.
The function must remain stable and safe for concurrent calls.
Exceptions
| Argument | kernelFunction is null. |
| Argument | Either delegate is null. |
| Argument | The support bounds are NaN, equal or reversed. |
| Argument | Normalization is not NaN or finite and positive, or the order is not positive. |
Kernel(Func<Double, Double>, Func<Double, Double>, Interval<Double>, Double, Int32)
Constructs a kernel with an explicit logarithmic evaluation function.
public Kernel(
Func<double, double> kernelFunction,
Func<double, double> logKernelFunction,
Interval<double> domain,
double norm = NaN,
int order = 2
)Parameters
- kernelFunction Func<Double, Double>
- The raw kernel function.
- logKernelFunction Func<Double, Double>
- The natural logarithm of the raw kernel, before normalization. Return negative infinity where the kernel is zero.
- domain Interval<Double>
- The interval where the kernel is nonzero.
- norm Double (Optional)
- The positive multiplicative normalization constant, or NaN to request numerical integration.
- order Int32 (Optional)
- The positive order of the kernel.
Remarks
Both delegates must describe the same kernel and be stable and safe for concurrent calls.
Providing a logarithmic delegate preserves log-density after the ordinary function underflows.
Exceptions
| Argument | Either delegate is null. |
| Argument | The support bounds are NaN, equal or reversed. |
| Argument | Normalization is not NaN or finite and positive, or the order is not positive. |