Skip to content

The Cuthill-McKee graph permutation algorithm for Julia

License

Notifications You must be signed in to change notification settings

rleegates/CuthillMcKee.jl

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

The Cuthill-McKee graph permutation algorithm for Julia

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages