Description
Use distance = column - row.
Packed matrix storage omits a triangle and maps coordinates into a linear array. Row-wise versus column-wise order and diagonal inclusion change the offset formula.
Use distance = column - row.
When to use this tool
Use Matrix Symmetric Band Storage Offset when you need an explicit packed or band-storage coordinate mapping.
How to use the tool and how it works
- Enter row, column, bandwidth. Use the units and conventions below.
- Run the tool. Correct any format, range, or cross-field input error before interpreting the output.
- Read stored, bandRow, storageColumn. Inspect stored before interpreting the associated values.
Use distance = column - row. Mark stored only for distance in [0, bandwidth]; return bandwidth - distance as bandRow when stored, otherwise -1, and retain column as storageColumn.1
| Input field | Meaning and units | Accepted input |
|---|---|---|
| row | Row | Required. Safe integer; minimum 0. |
| column | Column | Required. Safe integer; minimum 0. |
| bandwidth | Bandwidth | Required. Safe integer; minimum 0. |
| Output field | Interpretation | Returned shape |
|---|---|---|
| stored | Stored | Required. Boolean. |
| bandRow | Band Row | Required. Safe integer. |
| storageColumn | Storage Column | Required. Safe integer. |
{
"input": {
"row": 2,
"column": 4,
"bandwidth": 3
},
"output": {
"stored": true,
"bandRow": 1,
"storageColumn": 4
}
} Limitations and assumptions
- This uses an upper symmetric-band storage convention; -1 is a sentinel, and matrix dimensions and mirrored lookup are not supplied.
- 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
Check the consuming library's storage convention against several boundary coordinates before indexing its buffer.
References
Similar or alternative tools
- Matrix Banded Row First Last Column
For a valid row, set first = max(0, row - lower) and last = min(columns - 1, row + upper).
- Matrix Diagonal Band Index
Return column - row as signedBand and its magnitude as distanceFromDiagonal.