Skip to content

Main content

Matrix Symmetric Band Storage Offset Tool

Compute matrix symmetric band storage offset from explicit bounded inputs.

Loading tool…

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

  1. Enter row, column, bandwidth. Use the units and conventions below.
  2. Run the tool. Correct any format, range, or cross-field input error before interpreting the output.
  3. 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 fieldMeaning and unitsAccepted input
rowRowRequired. Safe integer; minimum 0.
columnColumnRequired. Safe integer; minimum 0.
bandwidthBandwidthRequired. Safe integer; minimum 0.
Output fieldInterpretationReturned shape
storedStoredRequired. Boolean.
bandRowBand RowRequired. Safe integer.
storageColumnStorage ColumnRequired. Safe integer.
json
{
  "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

  1. Calculation and input contract: matrix/matrix-symmetric-band-storage-offset — tool.io

Similar or alternative tools