Skip to content

Commit 0f9b7b8

Browse files
committed
docs: add comparison with SparseArrays.jl
1 parent 64b6177 commit 0f9b7b8

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

README.md

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
[![CI](https://github.com/gcalderone/MultidimensionalSparseArrays.jl/actions/workflows/CI.yml/badge.svg)](https://github.com/gcalderone/MultidimensionalSparseArrays.jl/actions/workflows/CI.yml)
44
[![codecov](https://codecov.io/gh/gcalderone/MultidimensionalSparseArrays.jl/branch/main/graph/badge.svg?token=YOUR_CODECOV_TOKEN)](https://codecov.io/gh/gcalderone/MultidimensionalSparseArrays.jl)
5-
[![Aqua QA](https://raw.githubusercontent.com/JuliaTesting/Aqua.jl/master/badge.svg)](https://github.com/JuliaTesting/Aqua.jl)
5+
[![Aqua](https://raw.githubusercontent.com/JuliaTesting/Aqua.jl/master/badge.svg)](https://github.com/JuliaTesting/Aqua.jl)
66

77
A Julia package for multidimensional sparse arrays.
88

@@ -12,6 +12,16 @@ A Julia package for multidimensional sparse arrays.
1212

1313
This package is designed to be a flexible and intuitive tool for scientific computing, data analysis, and any domain where large, sparse multidimensional data structures are common.
1414

15+
## Comparison with `SparseArrays.jl`
16+
17+
`MultidimensionalSparseArrays.jl` is designed to provide a flexible and easy-to-use interface for N-dimensional sparse arrays. While Julia's standard library `SparseArrays.jl` is highly optimized for 1-D and 2-D sparse arrays (vectors and matrices), `MultidimensionalSparseArrays.jl` offers a more general-purpose solution for higher-dimensional sparse data.
18+
19+
Key differences include:
20+
21+
- **Dimensionality:** `SparseArrays.jl` focuses on `SparseVector` and `SparseMatrixCSC`. `MultidimensionalSparseArrays.jl` is built from the ground up for N-dimensional arrays.
22+
- **Storage Format:** `MultidimensionalSparseArrays.jl` uses a dictionary-based storage (`Dict{CartesianIndex{N}, T}`), which is flexible for arbitrary dimensions. `SparseArrays.jl` uses the more rigid but highly efficient Compressed Sparse Column (CSC) format for matrices.
23+
- **Use Case:** If you are working with 1-D or 2-D sparse arrays and require high-performance linear algebra operations, `SparseArrays.jl` is the ideal choice. If you need to work with sparse data in three or more dimensions, `MultidimensionalSparseArrays.jl` provides a more natural and convenient API.
24+
1525
## Features
1626

1727
- **Memory Efficiency:** Only non-zero elements are stored, making it ideal for high-dimensional sparse data.

0 commit comments

Comments
 (0)