Description
Label order and adjacency of two supplied list indices.
List operations require explicit linear indices, mask alignment, chunk boundaries and empty-list policy. A selected-count change does not identify which positions changed, and an exact-multiple remainder may produce an optional empty chunk. These helpers use supplied lengths or masks rather than inspecting or modifying a list of values.
Label order and adjacency of two supplied list indices.
When to use this tool
Use List Two Index Adjacency Label when you already have firstIndex, secondIndex, listLength and need to label order and adjacency of two supplied list indices.
How to use the tool and how it works
- Enter firstIndex, secondIndex, listLength. Use the units and conventions below.
- Run the tool. Correct any format, range, or cross-field input error before interpreting the output.
- Read adjacent, order. Inspect adjacent before interpreting the associated values.
Require safe whole listLength>=1 and each index in [0,length-1]; adjacent means abs(second-first)=1 and order is forward, backward or same.1
| Input field | Meaning and units | Accepted input |
|---|---|---|
| firstIndex | First Index | Required. Safe integer; minimum 0. |
| secondIndex | Second Index | Required. Safe integer; minimum 0. |
| listLength | List Length | Required. Safe integer; minimum 1. |
| Output field | Interpretation | Returned shape |
|---|---|---|
| adjacent | Adjacent | Required. Boolean. |
| order | Order | Required. Text; maximum UTF-16 length 8192. |
{
"input": {
"firstIndex": 2,
"secondIndex": 3,
"listLength": 8
},
"output": {
"adjacent": true,
"order": "forward"
}
} Limitations and assumptions
- This is linear adjacency without wraparound; no actual list contents or element identity are inspected.
- 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
Operate on the actual list when contents, identity or reordered values matter. State the index origin and empty-chunk policy in the full processing workflow; local counts and masks do not establish a valid transformation of underlying data.
References
Similar or alternative tools
- List Padding Shortfall Count
Calculate padding needed to reach a supplied minimum list length.
- List Mask Count Delta
Compare selected counts in two aligned Boolean masks.