knot_tolerance Function
- Seyed Ali Ghasemi
- BSD 3-Clause
- 24 statements
public pure function knot_tolerance(knot, first, last) result(tol)
Compute a scale- and span-aware tolerance for knot comparisons.
The tolerance is based on endpoint spacing and interval width, then capped at one eighth of the smallest positive inspected span so that two distinct spans cannot collapse under the comparison.
Arguments
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=rk), | intent(in), | contiguous | :: | knot(:) |
Knot vector; an empty vector returns zero. |
|
| integer, | intent(in) | :: | first |
First inspected one-based index, clamped to the array. |
||
| integer, | intent(in) | :: | last |
Last inspected one-based index; reversed bounds are accepted. |