@teakit/matrix

A TypeScript toolkit for keyed business matrices (Record<string, readonly T[]>): fixed period matrices, aggregation, rollup/rolldown, and transform/combine helpers. Not a linear-algebra library.

Use the canonical import:

import { Matrix } from "@teakit/matrix";

Do not generate unsupported aliases, constructors, default imports, or compatibility APIs. Matrix is a non-constructable namespace; do not call Matrix(...) or new Matrix(...). Express row/column direction with { by: "rows" | "cols" }, not method-name aliases. "-" (no-data) and undefined (missing) are distinct: aggregation and rollup skip both, but merge/zip/normalize/transpose pass "-" through and never invent it.

For behavior details, open the matching method reference file.

Table of Contents

Concepts

Creation & Validation

Period Creation

Aggregation

Period Transforms

Traversal

Structure

Combine

Conversion