Description
Sum runLength minus one across positive integer runLengths using exact integer intermediates, then return the numeric internalEdges.
A run is a consecutive group of equal values. Its internal adjacencies and boundary relationships differ from counts of distinct values across a whole list.
Sum runLength minus one across positive integer runLengths using exact integer intermediates, then return the numeric internalEdges.
When to use this tool
Use Duplicate Run Internal Edge Count when you need one run boundary or adjacency calculation.
How to use the tool and how it works
- Enter runLengths. Use the units and conventions below.
- Run the tool. Correct any format, range, or cross-field input error before interpreting the output.
- Read internalEdges. Use the output convention below.
Sum runLength minus one across positive integer runLengths using exact integer intermediates, then return the numeric internalEdges.1
| Input field | Meaning and units | Accepted input |
|---|---|---|
| runLengths | Run Lengths | Required. Array of safe integer; maximum items 256. |
| Output field | Interpretation | Returned shape |
|---|---|---|
| internalEdges | Internal Edges | Required. Safe integer. |
{
"input": {
"runLengths": [
3,
1,
2
]
},
"output": {
"internalEdges": 3
}
} Limitations and assumptions
- This counts adjacencies within runs, not boundaries between runs; values and maximality of runs are not verified.
- 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.
Alternative or Complementary methods
Use a complete run-length scan when maximal runs and their values need to be constructed or verified.
References
Similar or alternative tools
- List Run Length One Boundary Update
Compare leftValue and rightValue exactly.
- List Pairwise Adjacency Output Count
Return zero pairs for an empty list.