A luxury sparse matrix package for Julia
Author QuantumBFS
13 Stars
Updated Last
1 Year Ago
Started In
August 2018


Build Status Codecov

High performance extension for sparse matrices.


  • General Permutation Matrix PermMatrix,
  • Identity Matrix IMatrix,
  • Coordinate Format Matrix SparseMatrixCOO,
  • Static Matrices SSparseMatrixCSC, SPermMatrix et. al.

with high performance type convertion, kron and multiplication operations.


Install with the package manager, pkg> add LuxurySparse.

How to use

Here is a simple example

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  # convertion to SparseMatrixCSC
Sid = id |> SparseMatrixCSC
@benchmark kron(Spm, Sid)    # compare the performance.

spm = pm |> staticize        # convertion to static matrices, notice `id` is already static.
@benchmark kron(spm, spm)    # compare the performance.
@benchmark kron(pm, pm)    # compare the performance.

For more information, please refer the latest document.

Planned features

  • Change PermMatrix to column major
  • Better support to static matrices.

Required Packages