Skip to content

Main content

Matrix Block Border Shape Budget Tool

Calculate matrix block border shape budget from explicit caller-supplied inputs.

Loading tool…

Description

Add addedRows and addedColumns to the core shape.

Matrix shapes can be empty or have singleton axes without containing a scalar. Broadcasting expands singleton dimensions under an explicit axis-by-axis compatibility rule.

Add addedRows and addedColumns to the core shape.

When to use this tool

Use Matrix Block Border Shape Budget when you need a matrix shape, count, or structural entry classification.

How to use the tool and how it works

  1. Enter coreRows, coreColumns, addedRows, addedColumns. 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 rows, columns, borderEntries. Use the output convention below.

Add addedRows and addedColumns to the core shape. Count borderEntries as coreRows × addedColumns + addedRows × coreColumns + addedRows × addedColumns.1

Input fieldMeaning and unitsAccepted input
coreRowsCore RowsRequired. Safe integer; minimum 0.
coreColumnsCore ColumnsRequired. Safe integer; minimum 0.
addedRowsAdded RowsRequired. Safe integer; minimum 0.
addedColumnsAdded ColumnsRequired. Safe integer; minimum 0.
Output fieldInterpretationReturned shape
rowsRowsRequired. Safe integer.
columnsColumnsRequired. Safe integer.
borderEntriesBorder EntriesRequired. Safe integer.
json
{
  "input": {
    "coreRows": 2,
    "coreColumns": 3,
    "addedRows": 1,
    "addedColumns": 2
  },
  "output": {
    "rows": 3,
    "columns": 5,
    "borderEntries": 9
  }
}

Limitations and assumptions

  • This counts new positions without storing data or determining block contents.
  • 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 all axes and actual data lengths when validating a complete matrix or broadcast operation.

References

  1. Calculation and input contract: matrix/matrix-block-border-shape-budget — tool.io

Similar or alternative tools