KernelAnchor Structure

Specifies the anchor point of a convolution or correlation kernel.

Definition

Namespace: Numerics.NET.SignalProcessing
Assembly: Numerics.NET (in Numerics.NET.dll) Version: 10.0.0
C#
public readonly struct KernelAnchor : IEquatable<KernelAnchor>
Inheritance
Object  →  ValueType  →  KernelAnchor
Implements
IEquatable<KernelAnchor>

Remarks

The anchor determines the time alignment between the kernel and signal. For a kernel of length M with anchor at index a, the output at position n is computed using the kernel sample at index a aligned with the signal sample at index n.

Common anchor positions:

  • Default: Adapts based on convolution mode (Centered for SameAsSignal, FirstSample otherwise)
  • FirstSample: Causal FIR filter (anchor = 0)
  • Centered: Symmetric FIR filter centered on current sample (anchor = floor(M/2))
  • LastSample: Anti-causal alignment (anchor = M-1)

Properties

Centered Gets a kernel anchor positioned at the center of the kernel (floor(M/2)).
Default Gets the default kernel anchor that adapts based on convolution mode. For SameAsSignal mode, this is Centered; for other modes, this is FirstSample.
FirstSample Gets a kernel anchor positioned at the first sample (index 0, causal).
Index Gets the explicit anchor index.
IsAbsolute Gets a value indicating whether the anchor is at an absolute index.
IsCentered Gets a value indicating whether the anchor is centered (floor(M/2)).
IsDefault Gets a value indicating whether the anchor uses default behavior (adapts to convolution mode).
IsFirstSample Gets a value indicating whether the anchor is at the first sample (index 0).
IsLastSample Gets a value indicating whether the anchor is at the last sample (index M-1).
IsOrigin Gets a value indicating whether the anchor is at a position relative to the center. This is the convention used in
C#
scipy.signal
.
LastSample Gets a kernel anchor positioned at the last sample (index M-1, anti-causal).

Methods

Absolute Creates a kernel anchor at an absolute index.
Equals(KernelAnchor) Determines whether two KernelAnchor instances are equal.
Equals(Object) Determines whether the specified object is equal to the current instance.
(Overrides ValueType.Equals(Object))
GetHashCode Returns the hash code for this instance.
(Overrides ValueType.GetHashCode())
GetTypeGets the Type of the current instance.
(Inherited from Object)
Origin Creates a kernel anchor at a position relative to the center.
ToString Returns a string representation of this instance.
(Overrides ValueType.ToString())

Operators

Equality(KernelAnchor, KernelAnchor) Determines whether two KernelAnchor instances are equal.
Inequality(KernelAnchor, KernelAnchor) Determines whether two KernelAnchor instances are not equal.

See Also