SparseDOKs

Crates.ioSparseDOKs
lib.rsSparseDOKs
version0.1.0
created_at2025-11-21 18:49:22.171936+00
updated_at2025-11-21 18:49:22.171936+00
descriptionSparse-matrix DOK implementations.
homepage
repositoryhttps://github.com/AmeMeida/projeto.git
max_upload_size
id1943993
size118,877
Lia (AmeMeida)

documentation

README

Sparse Matrix Implementations

Pure-rust implementations of common matrix operations in sparse form. New implementations must adhere to the MatrixOp trait.

DictMatrix

A DOK implementation using Rust's HashMap, with fast insertion, reads and optimized multiplication. Recommended as an intermediate format or if frequent reads and writes are needed.

BTreeMatrix

A DOK implementation using Rust's BTreeMap, with stable and predictable reads and insertions. Recommended if a lower memory footprint is needed or if ordered access is desirable, such as column or row selection.

Has much better cache-locality than the HashMap implementation for repeated matrix-matrix multiplications.

DenseMatrix

A classic full vector of vectors matrix implementation, ideal for small matrices, high densities, comparative benchmarking and probabilistic testing of the other implementations.

All of the operations on DenseMatrix are implemented in the most naive way possible, with only cache-locality optimizations present.

Features

  • Randomized matrix generator
  • Comprehensive benchmarking
  • Full unit test coverage
  • Probabilistic Testing with the dense matrix implementation
  • Garanteed O(1) transposition for all 3 implementations.
Commit count: 0

cargo fmt