Grid Boundary Condition.Clamp Property
Gets a boundary condition that clamps out-of-range indices to the nearest edge.
Definition
Namespace: Numerics.NET.Curves.Surfaces
Assembly: Numerics.NET (in Numerics.NET.dll) Version: 10.1.0
C#
Assembly: Numerics.NET (in Numerics.NET.dll) Version: 10.1.0
public static GridBoundaryCondition Clamp { get; }Property Value
GridBoundaryConditionRemarks
When an interpolation stencil requires a value at index i < 0 or i ≥ N, the index is clamped to 0 or N-1 respectively. This effectively repeats the edge values.
Effect: For a grid with values [v₀, v₁, ..., vₙ₋₁], requesting index -1 returns v₀, and requesting index N returns vₙ₋₁.
Use cases: General-purpose default for most interpolation tasks. Provides smooth behavior at edges without introducing artifacts.
This is the default boundary condition when none is specified.