linalg
0.4.0, released 5 years ago by bessems.dev
A pure Dart linear algebra library for matrix and vector operations.
What it does
Provides Matrix and Vector classes with operations like multiplication, inversion, determinant, and basic statistics. It is dependency‑free and works on all Dart platforms.
AI-written summary of version 0.4.0, based on the package's README and metadata. Report an inaccuracy
Use it when
- Need basic linear algebra in a Flutter or Dart project
- Want a lightweight, pure‑Dart solution without external dependencies
- Working on cross‑platform code that must run on web, mobile, and desktop
Skip it when
- Require GPU‑accelerated matrix math
- Need advanced numerical methods or large‑scale linear algebra
- Integrating with existing heavy math libraries like Eigen or BLAS
Strengths
- Pure Dart, no native dependencies
- Supports all platforms (web, mobile, desktop)
- Simple API with clear documentation
- Null safety support since 0.4.0
Weaknesses
- Limited to basic linear algebra, no advanced solvers
- No support for sparse matrices or large data sets
- No GPU acceleration
Setup
- Kind
- Pure Dart
- Effort
- Low
- Code generation
- No
- Direct dependencies
- 0
Add dependency in pubspec and import 'package:linalg/linalg.dart';
final Matrix a = Matrix([[1, 2], [3, 4]]);
final Vector b = Vector.column([2, 3]);
final Matrix result = a * b;
print(result);Alternatives
Packages that do the same job and could replace linalg.
- ml_linalg
SIMD-based linear algebra and statistics library for Dart.
80Compare - matrices
High-performance matrix computation and linear algebra library with built-in SIMD support.
60Compare - advance_math
A Dart library for mathematical programming, complex numbers, algebra, statistics, and geometry.
66Compare
Works with
Packages commonly used together with linalg: ones it builds on, ones built on it, and its own family.