Description
Check membership in the half-open row and column ranges of the block.
A matrix coordinate, a storage offset, and a block-local coordinate are different representations. Shape, stride, origin, and transpose conventions determine the correct mapping.
Check membership in the half-open row and column ranges of the block.
When to use this tool
Use Matrix: Matrix Block Local Coordinate when you need one explicit matrix-coordinate or address conversion.
How to use the tool and how it works
- Enter row, column, blockRowStart, blockColumnStart, blockRows, blockColumns. 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.
Check membership in the half-open row and column ranges of the block. Return zero-based local coordinates when inside, otherwise -1 for both.1
| Input field | Meaning and units | Accepted input |
|---|---|---|
| row | Row | Required. Safe integer. |
| column | Column | Required. Safe integer. |
| blockRowStart | Block Row Start | Required. Safe integer. |
| blockColumnStart | Block Column Start | Required. Safe integer. |
| blockRows | Block Rows | Required. Safe integer. |
| blockColumns | Block Columns | Required. Safe integer. |
| Output field | Interpretation | Returned shape |
|---|---|---|
| result | Result | Required. Object. |
| result.inside | Inside | Calculated result member: boolean. |
| result.localRow | Local Row | Calculated result member: number. |
| result.localColumn | Local Column | Calculated result member: number. |
{
"input": {
"row": 4,
"column": 6,
"blockRowStart": 3,
"blockColumnStart": 4,
"blockRows": 2,
"blockColumns": 3
},
"output": {
"result": {
"inside": true,
"localRow": 1,
"localColumn": 2
}
}
} Limitations and assumptions
- Zero-sized blocks contain no entries; sentinel coordinates must be read with inside rather than used as array indices.
- 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
Validate the full shape, memory span, and storage convention before using the resulting index.
References
Similar or alternative tools
- Matrix Block Transpose Coordinate Map
Split column by blockColumns for transposed blockRow and localRow, and split row by blockRows for blockColumn and localColumn.
- Matrix Strided View Entry Offset
Calculate base + row × rowStride + column × columnStride and require a nonnegative safe-integer offset.