Description
Select the interval using tieSide at an interior knot, retain the first or last interval at domain endpoints, and return -1 outside.
Interpolation knots divide a coordinate range into intervals. Repeated nodes, unequal spacing, and exact boundary selection can change how a piecewise interpolant is interpreted.
Select the interval using tieSide at an interior knot, retain the first or last interval at domain endpoints, and return -1 outside.
When to use this tool
Use Interpolation: Piecewise Knot Side Selection when you need one knot-interval or multiplicity diagnostic.
How to use the tool and how it works
- Enter knots, x, tieSide. Use the units and conventions below.
- Run the tool. Correct any format, range, or cross-field input error before interpreting the output.
- Read result. Expand result to inspect the returned fields.
Require at least two strictly increasing knots. Select the interval using tieSide at an interior knot, retain the first or last interval at domain endpoints, and return -1 outside.1
| Input field | Meaning and units | Accepted input |
|---|---|---|
| knots | Knots | Required. Array of finite number. Implementation limit: 128 items. |
| x | X | Required. Finite number. |
| tieSide | Tie Side | Required. Text; one of "left", "right". Implementation limit: 8192 Unicode code points and 16384 UTF-16 code units. |
| Output field | Interpretation | Returned shape |
|---|---|---|
| result | Result | Required. Object. |
| result.intervalIndex | Interval Index | Calculated result member: number. |
| result.outside | Outside | Calculated result member: boolean. |
{
"input": {
"knots": [
0,
1,
2
],
"x": 1,
"tieSide": "right"
},
"output": {
"result": {
"intervalIndex": 1,
"outside": false
}
}
} Limitations and assumptions
- Outside is a diagnostic flag and no extrapolation interval is assigned; exact knot equality uses no tolerance.
- Outputs are nested inside result. Inputs must satisfy both the field types and the cross-field conditions above. Invalid input causes an error; a successful false flag or documented placeholder is a different result.
- Numeric calculations use binary floating point unless exact decimal-integer arithmetic is explicitly stated. No hidden measurement tolerance or decimal rounding is added; nonfinite or out-of-contract results are rejected. Numeric signed-zero results are exported as zero.
Alternative or Complementary methods
Validate the complete knot sequence and interpolation method, including tolerance and extrapolation policies.
References
Similar or alternative tools
- Spline Knot Interval Zero Span Flag
Return next knot minus current knot and zero for an exact repeated pair.
- Interpolation: Interpolation Knot Multiplicity Count
Require nondecreasing knots and count entries exactly equal to target.