Description
Select row and return its start, next pointer as endExclusive, and their difference as count.
Compressed sparse-row storage locates each row between two pointer offsets. Repeated pointers represent empty rows, while a missing column search needs a distinct sentinel.
Select row and return its start, next pointer as endExclusive, and their difference as count.
When to use this tool
Use Matrix CSR Single Row Storage Span when you need one CSR row span or local lookup.
How to use the tool and how it works
- Enter rowPointers, row. Use the units and conventions below.
- Run the tool. Correct any format, range, or cross-field input error before interpreting the output.
- Read start, endExclusive, count. Use the output convention below.
Require rowPointers starting at zero, nonnegative and nondecreasing, with at least two entries. Select row and return its start, next pointer as endExclusive, and their difference as count.1
| Input field | Meaning and units | Accepted input |
|---|---|---|
| rowPointers | Row Pointers | Required. Array of safe integer; maximum items 256. |
| row | Row | Required. Safe integer; minimum 0. |
| Output field | Interpretation | Returned shape |
|---|---|---|
| start | Start | Required. Safe integer. |
| endExclusive | End boundary excluded from the represented span. | Required. Safe integer. |
| count | Count | Required. Safe integer. |
{
"input": {
"rowPointers": [
0,
2,
2,
5
],
"row": 1
},
"output": {
"start": 2,
"endExclusive": 2,
"count": 0
}
} Limitations and assumptions
- This validates the pointer layout only; column indices, value-array lengths, and duplicate entries 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 pointer, column, and value arrays together, including shape, sorting, and duplicate-entry policy.
References
Similar or alternative tools
- Matrix CSR Row Column Local Offset
Search columnIndices only within [rowStart, rowEnd).
- Matrix Symmetric Band Storage Offset
Use distance = column - row.