Skip to content
pubscout

data

0.15.2, released 11 months ago by lukas-renggli.ch

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

WASM-ready
$ flutter pub add data
Source repository

What it does

Provides data structures and algorithms for vectors, matrices, polynomials, and numerical computations such as integration and regression. It allows solving linear equations, finding eigenvalues, and performing statistical distributions.

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

Use it when

  • You need to perform matrix operations or linear algebra in Dart
  • You need to handle polynomial regression or curve fitting
  • You need numerical integration or statistical distribution calculations

Skip it when

  • You are building a standard UI or state-management heavy application
  • You require heavy hardware GPU acceleration for large-scale machine learning tensors

Strengths

  • Fast and space-efficient data structures for vectors and matrices
  • Comprehensive mathematical algorithms including solvers and eigenvalue decomposition
  • Supports Dart, Flutter, and the web

Weaknesses

  • Limited to specific mathematical and numerical domains
  • Not a general-purpose ML/AI framework

Setup

Kind
Pure Dart
Effort
Low
Code generation
No
Direct dependencies
3

Simply add the dependency to pubspec.yaml and import 'package:data/data.dart'.

final a = Matrix<double>.fromRows(DataType.float64, [
  [2, 1, 1],
  [1, 3, 2],
  [1, 0, 0],
]);
final b = Vector<double>.fromList(DataType.float64, [4, 5, 6]);
final x = a.solve(b.columnMatrix).column(0);
print(x.format(valuePrinter: Printer.fixed()));

Alternatives

Packages that do the same job and could replace data.

Works with

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