Skip to content
pubscout

matrices

2.0.0, released 5 months ago by abandoft.com

High-performance matrix computation and linear algebra library with built-in SIMD support.

WASM-ready
$ flutter pub add matrices
Source repository

What it does

Provides 32-bit and 64-bit matrix and vector types, linear algebra solvers, decompositions, iterative methods, and CSR sparse matrix support. Uses contiguous typed-data storage and pure Dart SIMD APIs for acceleration without external FFI dependencies.

AI-written summary of version 2.0.0, based on the package's README and metadata. Report an inaccuracy

Use it when

  • You need high-performance dense or sparse matrix computations in pure Dart.
  • You require linear algebra features like LU, QR, Cholesky, SVD, or PCA.

Skip it when

  • You require native BLAS/LAPACK bindings or GPU execution.
  • You need automatic differentiation or distributed matrix operations.

Strengths

  • Uses built-in SIMD APIs without FFI or binary runtime dependencies.
  • Explicit 32-bit and 64-bit precision choices with continuous storage.
  • Broad coverage of direct linear algebra, decompositions, and iterative solvers.

Weaknesses

  • Does not include native BLAS/LAPACK or GPU execution support.
  • Fails fast on shape and numerical preconditions rather than silent reshaping.

Setup

Kind
Pure Dart
Effort
Low
Code generation
No
Direct dependencies
0
import 'package:matrices/matrices.dart';

void main() {
  final a = mat([
    [1, 2, 3],
    [4, 5, 6],
  ]);

  final b = mat([
    [7, 8],
    [9, 10],
    [11, 12],
  ]);

  print(a * b);
}

Alternatives

Packages that do the same job and could replace matrices.

  • linalg

    A pure Dart linear algebra library for matrix and vector operations.

  • ml_linalg

    SIMD-based linear algebra and statistics library for Dart.

  • advance_math

    A Dart library for mathematical programming, complex numbers, algebra, statistics, and geometry.

  • liquify

    A powerful and extensible Liquid template engine for Dart.