Skip to content

This site describes solve-engine as it is on main: 2.43.0, which npm does not have yet. npm installs 2.40.0, so a page may show an answer that version does not give yet.

SerializedMatrix

Defined in: packages/engine/src/worker/dto.ts:33

A matrix flattened for transport.

cells is column-major, the same order as MatrixData.data, so a host indexes it identically. Finite numeric and boolean cells pass through as themselves; a symbolic cell (a free-variable algebraic entry) becomes its formatted string, since a SymbolicNode is a class instance that would not survive the clone; and a non-finite numeric cell (Infinity/-Infinity/NaN, from e.g. a [1/0, 2]) becomes the same string tag the scalar SerializedWorkerValue.nonFinite uses, because a raw non-finite number does not survive JSON (it becomes null). A host reads a numeric string cell back with Number(cell).

cells: (string | number | boolean)[];

Defined in: packages/engine/src/worker/dto.ts:36


cols: number;

Defined in: packages/engine/src/worker/dto.ts:35


hasSymbolic: boolean;

Defined in: packages/engine/src/worker/dto.ts:37


rows: number;

Defined in: packages/engine/src/worker/dto.ts:34


optional unit?: string;

Defined in: packages/engine/src/worker/dto.ts:39

The unit every numeric cell is in, for a list of quantities (km for [1 km, 500 m]); absent for plain numbers.