Description
Sum counts before slot for start, then add counts[slot] for end.
Half-open list ranges include their start and exclude their end. Empty and touching ranges can be disjoint even when their boundary coordinates coincide.
Sum counts before slot for start, then add counts[slot] for end.
When to use this tool
Use List Bucket Count Offset One Slot when you need a precise range relationship for a list operation.
How to use the tool and how it works
- Enter counts, slot. Use the units and conventions below.
- Run the tool. Correct any format, range, or cross-field input error before interpreting the output.
- Read start, end. Use the output convention below.
Sum counts before slot for start, then add counts[slot] for end. Counts are nonnegative and slot must exist.1
| Input field | Meaning and units | Accepted input |
|---|---|---|
| counts | Counts | Required. Array of safe integer; maximum items 256. |
| slot | Slot | Required. Safe integer; minimum 0. |
| Output field | Interpretation | Returned shape |
|---|---|---|
| start | Start | Required. Safe integer. |
| end | End | Required. Safe integer. |
json
{
"input": {
"counts": [
2,
3,
1
],
"slot": 1
},
"output": {
"start": 2,
"end": 5
}
} Limitations and assumptions
- Zero-count slots have empty half-open spans; source records and bucket membership are not checked.
- 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 Chunk Final Block Size
Return ceil(length / size) chunks.
- List Cartesian Row Flatten Index
Return leftIndex × rightSize + rightIndex with rightIndex bounded by positive rightSize.