Interval Endpoint Toggle Effect
Audit membership effect of toggling one interval endpoint closure; degenerate intervals still require both endpoint conditions.
Description
Audit membership effect of toggling one interval endpoint closure; degenerate intervals still require both endpoint conditions.
Changing an interval endpoint from open to closed affects membership only at that endpoint. Degenerate intervals make the interaction of both endpoint flags especially visible.
When to use this tool
Audit membership effect of toggling one interval endpoint closure; degenerate intervals still require both endpoint conditions.
- Prepare the supplied start, end, value, startClosed, endClosed, toggleStart fields for this operation.
- Compare the complete example with the representation used by your own input before carrying the result into another step.
How to use the tool and how it works
- Enter start, end, value, startClosed, endClosed, toggleStart. Use the exact text syntax, units and index conventions explained below.
- Run the tool. If input validation fails, correct the supplied fields before interpreting any result.
- Read result.includedBefore, result.includedAfter, result.membershipChanged. Interpret false, null and empty lists using the distinctions below; they can be valid outputs.
Check membership using the supplied startClosed/endClosed flags, toggle exactly the endpoint selected by toggleStart, then report before, after and whether membership changed.1
| Input field | Meaning and representation | Accepted input |
|---|---|---|
| start | start. | Finite number |
| end | end. | Finite number |
| value | value. | Finite number |
| startClosed | Explicit choice for start closed; supply a boolean rather than a text label. | true or false |
| endClosed | Explicit choice for end closed; supply a boolean rather than a text label. | true or false |
| toggleStart | Explicit choice for toggle start; supply a boolean rather than a text label. | true or false |
| Output field | Interpretation |
|---|---|
| result | Object containing the named outputs below. |
| result.includedBefore | Flag for included before under the exact condition described above. |
| result.includedAfter | Flag for included after under the exact condition described above. |
| result.membershipChanged | Flag for membership changed under the exact condition described above. |
{
"input": {
"start": 0,
"end": 1,
"value": 0,
"startClosed": false,
"endClosed": true,
"toggleStart": true
},
"output": {
"result": {
"includedBefore": false,
"includedAfter": true,
"membershipChanged": true
}
}
} Limitations and assumptions
- start may equal end, and that singleton is included only when both endpoint flags permit it. The tool tests one value rather than returning a general interval-difference set.
- Interval-array rows contain exactly two finite endpoints in start/end order, with at most 128 intervals per collection. Individual operations state when positive length, integer endpoints or explicit inclusion flags are required.
- Every declared top-level field is required and unexpected fields are rejected. Numeric inputs must be finite; ordinary text fields are bounded to 8,192 UTF-16 code units, with tighter operation-specific limits where stated.
- Ordinary string lists have at most 128 entries of at most 128 code units each; numeric lists and matrices have separate bounded size checks. Nonfinite results and excessively large serialized outputs are rejected.
- Indexes are zero-based and spans have an exclusive end unless explicitly stated otherwise. A valid false, null or empty-list result is distinct from malformed input.
Alternative or Complementary methods
Retain the endpoint convention with every result. Continuous length, integer point counts and open/closed membership differ; merge returned cells separately when a canonical minimal interval collection is required.
References
Similar or alternative tools
- Closed Integer Interval Overlap Count
Count shared integers in closed integer endpoint intervals, including one-point contact.
- Half Open Interval Distance
Compute infimum distance between nonempty half-open intervals and distinguish zero-distance touching from attained overlap.