CuthillMcKee.jl

The Cuthill-McKee graph permutation algorithm for Julia
Author rleegates
Popularity
3 Stars
Updated Last
7 Months Ago
Started In
April 2019

CuthillMcKee.jl

Stable Dev Build Status Build Status Codecov Coveralls

The Cuthill McKee graph permutation algorithm for Julia.

The algorithm is based on the description of the RCM permutation by Ciprian Zavoianu.

Installation (latest tagged version):

using Pkg
Pkg.add("CuthillMcKee")

Installation (from master):

using Pkg
Pkg.add(PackageSpec(url="https://github.com/rleegates/CuthillMcKee.jl.git"))

Example:

using SparseArrays, CuthillMcKee, UnicodePlots, LinearAlgebra
N = 500_000
A = sprand(N, N, 1/N)
A = A+A'+30I
b = rand(N)
@time p = symrcm(A)
ip = symrcm(A, true, true)
AP = rcmpermute(A)
@assert norm( (AP*b[p])[ip]-A*b ) < 1e-12
display(spy(A))

pre_rcm_sparsity

display(spy(AP))

pre_rcm_sparsity