Skip to content
pubscout

ml_linalg

13.12.9, released 2 months ago by ml-algo.com

SIMD-based linear algebra and statistics library for Dart.

WASM-ready
$ flutter pub add ml_linalg
Source repository

What it does

Provides high-performance vector and matrix operations implemented using SIMD types (Float32x4 and Float64x2) for data science and numeric calculations. It includes linear algebra operations, decompositions, distances, statistical methods, and system of linear equations solving.

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

Use it when

  • You need performant vector and matrix math leveraging SIMD in Dart.
  • You are building data science or machine learning tools in Dart and need fast numeric data manipulation.

Skip it when

  • You only need basic 3D/4D vector math for graphics (use vector_math instead).
  • Your application does not require heavy numeric calculations or linear algebra.

Strengths

  • High performance through SIMD optimization (Float32x4 and Float64x2).
  • Immutable vector and matrix implementations with rich mathematical operations.
  • Implements Iterable<double> on vectors.

Weaknesses

  • Limited to linear algebra and data science use cases.
  • More complex than standard List operations if only simple arithmetic is needed.

Setup

Kind
Pure Dart
Effort
Low
Code generation
No
Direct dependencies
1
import 'package:ml_linalg/linalg.dart';

void main() {
  final vector1 = Vector.fromList([1.0, 2.0, 3.0, 4.0, 5.0]);
  final vector2 = Vector.fromList([2.0, 3.0, 4.0, 5.0, 6.0]);
  final result = vector1 + vector2;
  print(result.toList()); // [3.0, 5.0, 7.0, 9.0, 11.0]
}

Alternatives

Packages that do the same job and could replace ml_linalg.

  • statistics

    Statistics package for data manipulation, mathematical functions, and Bayesian Networks.

  • data

    Time and space efficient data structures and algorithms for vectors, matrices, and math.

  • advance_math

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

  • linalg

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

Works with

Packages commonly used together with ml_linalg: ones it builds on, ones built on it, and its own family.