Description
Validate a lower-triangle coordinate.
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.
Validate a lower-triangle coordinate.
When to use this tool
Use Matrix: Matrix Packed Lower Index when you need an explicit packed or band-storage coordinate mapping.
How to use the tool and how it works
- Enter size, row, column, includeDiagonal. Use the units and conventions below.
- Run the tool. Correct any format, range, or cross-field input error before interpreting the output.
- Read result. Expand result to inspect the returned fields.
Validate a lower-triangle coordinate. Return row × (row + 1) / 2 + column with diagonal storage, or row × (row - 1) / 2 + column without it.1
| Input field | Meaning and units | Accepted input |
|---|---|---|
| size | Size | Required. Safe integer. |
| row | Row | Required. Safe integer. |
| column | Column | Required. Safe integer. |
| includeDiagonal | Include Diagonal | Required. Boolean. |
| Output field | Interpretation | Returned shape |
|---|---|---|
| result | Result | Required. Object. |
| result.packedOffset | Packed Offset | Calculated result member: number. |
json
{
"input": {
"size": 4,
"row": 2,
"column": 1,
"includeDiagonal": true
},
"output": {
"result": {
"packedOffset": 4
}
}
} Limitations and assumptions
- The packed index is zero based and row wise; invalid triangle positions are rejected rather than mirrored.
- Outputs are nested inside result. 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: Matrix Packed Upper Index
Validate an upper-triangle coordinate and row-wise packed storage.
- Matrix: Matrix Symmetric Packed Alias Index
Validate zero-based row and column within size.