@@ -2,31 +2,35 @@ module SparseMatrixColoringsCliqueTreesExt
22
33using CliqueTrees: CliqueTrees
44using SparseArrays
5- using SparseMatrixColorings: SparseMatrixColorings, AdjacencyGraph, BipartiteGraph, PerfectEliminationOrder, pattern
5+ using SparseMatrixColorings:
6+ SparseMatrixColorings, AdjacencyGraph, BipartiteGraph, PerfectEliminationOrder, pattern
67
7- function SparseMatrixColorings. vertices (g:: AdjacencyGraph{T} , order:: PerfectEliminationOrder ) where T
8+ function SparseMatrixColorings. vertices (
9+ g:: AdjacencyGraph{T} , order:: PerfectEliminationOrder
10+ ) where {T}
811 S = pattern (g)
912
1013 # construct matrix with sparsity pattern S
11- M = SparseMatrixCSC {Bool, T} (size (S)... , S. colptr, rowvals (S), ones (Bool, nnz (S)))
14+ M = SparseMatrixCSC {Bool,T} (size (S)... , S. colptr, rowvals (S), ones (Bool, nnz (S)))
1215
1316 # can also use alg=CliqueTrees.LexBFS()
1417 order, _ = CliqueTrees. permutation (M; alg= CliqueTrees. MCS ())
1518
1619 return reverse! (order)
1720end
1821
19- function SparseMatrixColorings. vertices (bg:: BipartiteGraph{T} , :: Val{side} , order:: PerfectEliminationOrder ) where {T, side}
20- S = pattern (g, Val (side))
22+ function SparseMatrixColorings. vertices (
23+ bg:: BipartiteGraph{T} , :: Val{side} , order:: PerfectEliminationOrder
24+ ) where {T,side}
25+ S = pattern (bg, Val (side))
2126
2227 # construct matrix with sparsity pattern S
23- M = SparseMatrixCSC {Bool, T} (size (S)... , S. colptr, rowvals (S), ones (Bool, nnz (S)))
28+ M = SparseMatrixCSC {Bool,T} (size (S)... , S. colptr, rowvals (S), ones (Bool, nnz (S)))
2429
2530 # can also use alg=CliqueTrees.LexBFS()
2631 order, _ = CliqueTrees. permutation (M; alg= CliqueTrees. MCS ())
2732
2833 return reverse! (order)
29-
3034end
3135
3236end # module
0 commit comments