Skip to main content

Module matrix

Module matrix 

Source
Expand description

Tensor/matrix lens: an editable scene/matrix.

A matrix value is a list of rows of numbers. The lens renders it as a scene/matrix with editable cells; editing a cell applies an intent/edit-field path [row, col] and returns a new matrix value.

Constants§

MATRIX_LENS
The matrix lens id.

Functions§

cell
Read a matrix cell as f64.
cell_path
The [row, col] edit-field path for a matrix cell, in the standard segment form used by the universal editor.
labeled_matrix_view
Render a labelled matrix for routing, algorithms, and component grids.
matrix
Build a matrix value from rows of numbers.
matrix_view
Render a matrix value as an editable scene/matrix.
set_cell
Set a matrix cell, returning the new matrix value. Out-of-range indices leave the matrix unchanged.