Description
Mark disjoint for either empty range or nonoverlapping endpoints; touching independently checks equal opposing endpoints.
Half-open list ranges include their start and exclude their end. Empty and touching ranges can be disjoint even when their boundary coordinates coincide.
Mark disjoint for either empty range or nonoverlapping endpoints; touching independently checks equal opposing endpoints.
When to use this tool
Use List Swap Range Disjointness Flag when you need a precise range relationship for a list operation.
How to use the tool and how it works
- Enter firstStart, firstEnd, secondStart, secondEnd. Use the units and conventions below.
- Run the tool. Correct any format, range, or cross-field input error before interpreting the output.
- Read disjoint, touching. Inspect disjoint, touching before interpreting the associated values.
Require ordered nonnegative half-open ranges. Mark disjoint for either empty range or nonoverlapping endpoints; touching independently checks equal opposing endpoints.1
| Input field | Meaning and units | Accepted input |
|---|---|---|
| firstStart | First Start | Required. Safe integer; minimum 0. |
| firstEnd | First End | Required. Safe integer. |
| secondStart | Second Start | Required. Safe integer; minimum 0. |
| secondEnd | Second End | Required. Safe integer. |
| Output field | Interpretation | Returned shape |
|---|---|---|
| disjoint | Disjoint | Required. Boolean. |
| touching | Touching | Required. Boolean. |
{
"input": {
"firstStart": 1,
"firstEnd": 3,
"secondStart": 3,
"secondEnd": 5
},
"output": {
"disjoint": true,
"touching": true
}
} Limitations and assumptions
- Empty ranges are disjoint even when located inside another range; no list length or swap feasibility is validated.
- 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 ranges against the actual list length and the operation's overlap policy before mutating data.
References
Similar or alternative tools
- List Splice Cursor Affinity
Validate a cursor boundary and splice bounds.
- List: List Single Splice Length Delta
Clamp deleteCount to the available suffix length.