https://github.com/quantumbfs/luxurysparse.jl
A luxury sparse matrix package for Julia
https://github.com/quantumbfs/luxurysparse.jl
identity permutation sparse-matrix sparsematrixcoo
Last synced: 9 months ago
JSON representation
A luxury sparse matrix package for Julia
- Host: GitHub
- URL: https://github.com/quantumbfs/luxurysparse.jl
- Owner: QuantumBFS
- License: other
- Created: 2018-08-02T06:41:20.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2024-04-17T01:59:07.000Z (over 1 year ago)
- Last Synced: 2025-03-17T06:45:01.728Z (10 months ago)
- Topics: identity, permutation, sparse-matrix, sparsematrixcoo
- Language: Julia
- Homepage: https://quantumbfs.github.io/LuxurySparse.jl/latest/
- Size: 256 KB
- Stars: 36
- Watchers: 3
- Forks: 7
- Open Issues: 8
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# LuxurySparse.jl
[](https://github.com/QuantumBFS/LuxurySparse.jl/actions)
[](https://codecov.io/gh/QuantumBFS/LuxurySparse.jl)
High performance extension for sparse matrices.
## Contents
* General Permutation Matrix `PermMatrix`,
* Identity Matrix `IMatrix`,
* Coordinate Format Matrix `SparseMatrixCOO`,
* Static Matrices `SSparseMatrixCSC`, `SPermMatrix` et. al.
with high performance type conversion, `kron`, and multiplication operations.
## Installation
Install with the package manager, `pkg> add LuxurySparse`.
## Usage
```julia
using SparseArrays
using LuxurySparse
using BenchmarkTools
pm = pmrand(7) # a random permutation matrix
id = IMatrix(3) # an identity matrix
@benchmark kron(pm, id) # kronecker product
Spm = pm |> SparseMatrixCSC # convert to SparseMatrixCSC
Sid = id |> SparseMatrixCSC
@benchmark kron(Spm, Sid) # compare the performance to the previous operation.
spm = pm |> staticize # convert to static matrix, notice that `id` is already static.
@benchmark kron(spm, spm) # compare performance
@benchmark kron(pm, pm)
```
For more information, please refer the latest [Documentation](https://quantumbfs.github.io/LuxurySparse.jl/latest/).
## Planned features
* Change `PermMatrix` to column major
* Better support of conversion to static matrices