Description
Calculate a diagonal offset and zero-based row/column indices.
Matrix indices depend on whether counting begins at zero or one and on the direction of row/column offsets. Comparing a transposed entry pair is one local symmetry check. Supplied index arithmetic does not establish matrix dimensions, valid element membership or a global algebraic property.
Calculate a diagonal offset and zero-based row/column indices.
When to use this tool
Use Matrix Diagonal Unit Offset when you already have row, column, oneBased and need to calculate a diagonal offset and zero-based row/column indices.
How to use the tool and how it works
- Enter row, column, oneBased. Use the units and conventions below.
- Run the tool. Correct any format, range, or cross-field input error before interpreting the output.
- Read diagonalOffset, rowZeroBased, columnZeroBased. Use the output convention below.
Require safe whole indices consistent with the oneBased flag; return column-row and subtract the selected origin from both indices.1
| Input field | Meaning and units | Accepted input |
|---|---|---|
| row | Row | Required. Safe integer. |
| column | Column | Required. Safe integer. |
| oneBased | One Based | Required. Boolean. |
| Output field | Interpretation | Returned shape |
|---|---|---|
| diagonalOffset | column-row; positive is above the main diagonal, independently of the selected index origin. | Required. Safe integer. |
| rowZeroBased | Row Zero Based | Required. Safe integer. |
| columnZeroBased | Column Zero Based | Required. Safe integer. |
{
"input": {
"row": 2,
"column": 4,
"oneBased": true
},
"output": {
"diagonalOffset": 2,
"rowZeroBased": 1,
"columnZeroBased": 3
}
} Limitations and assumptions
- Positive offset is above the main diagonal under row/column indexing; no actual matrix dimensions or entries are 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
Use the actual matrix and its declared index convention when checking entries or a global property. Apply complete symmetry or structural checks with an explicit numerical tolerance when one pairwise residual is insufficient.
References
Similar or alternative tools
- Matrix One Based Index Crosswalk
Convert supplied row and column indices between zero- and one-based conventions.
- Matrix Symmetric Entry Pair Residual
Compare one pair of transposed matrix-entry values.