You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The algorithms implemented in this package are all taken from the following survey:
20
+
The algorithms implemented in this package are mainly taken from the following articles:
21
21
22
22
> [_What Color Is Your Jacobian? Graph Coloring for Computing Derivatives_](https://epubs.siam.org/doi/10.1137/S0036144504444711), Gebremedhin et al. (2005)
23
23
24
-
Some parts of the survey (like definitions and theorems) are also copied verbatim or referred to by their number in the documentation.
24
+
> [ColPack: Software for graph coloring and related problems in scientific computing](https://dl.acm.org/doi/10.1145/2513109.2513110), Gebremedhin et al. (2013)
25
+
26
+
Some parts of the articles (like definitions) are thus copied verbatim in the documentation.
Copy file name to clipboardExpand all lines: src/SparseMatrixColorings.jl
+10-13Lines changed: 10 additions & 13 deletions
Original file line number
Diff line number
Diff line change
@@ -3,27 +3,24 @@
3
3
4
4
Coloring algorithms for sparse Jacobian and Hessian matrices.
5
5
6
-
The algorithms implemented in this package are all taken from the following survey:
6
+
The algorithms implemented in this package are mainly taken from the following articles:
7
7
8
8
> [_What Color Is Your Jacobian? Graph Coloring for Computing Derivatives_](https://epubs.siam.org/doi/10.1137/S0036144504444711), Gebremedhin et al. (2005)
9
9
10
-
Some parts of the survey (like definitions and theorems) are also copied verbatim or referred to by their number in the documentation.
10
+
> [ColPack: Software for graph coloring and related problems in scientific computing](https://dl.acm.org/doi/10.1145/2513109.2513110), Gebremedhin et al. (2013)
11
+
12
+
Some parts of the articles (like definitions) are thus copied verbatim in the documentation.
11
13
"""
12
14
module SparseMatrixColorings
13
15
14
16
using ADTypes: ADTypes, AbstractColoringAlgorithm
15
-
using LinearAlgebra: Transpose, parent, transpose
16
-
using Random: AbstractRNG
17
-
using SparseArrays: SparseMatrixCSC, nzrange, rowvals
18
-
19
-
include("utils.jl")
20
-
21
-
include("bipartite_graph.jl")
22
-
include("adjacency_graph.jl")
23
-
24
-
include("distance2_coloring.jl")
25
-
include("star_coloring.jl")
17
+
using LinearAlgebra: Diagonal, Transpose, checksquare, parent, transpose
18
+
using Random: AbstractRNG, default_rng, randperm
19
+
using SparseArrays: SparseArrays, SparseMatrixCSC, nzrange, rowvals, spzeros
Return `true` if coloring the columns of the matrix `A` with the vector `colors` results in a partition that is structurally orthogonal, and `false` otherwise.
5
8
6
-
Def 3.2: A partition of the columns of a matrix `A` is _structurally orthogonal_ if, for every nonzero element `A[i, j]`, the group containing column `A[:, j]` has no other column with a nonzero in row `i`.
9
+
A partition of the columns of a matrix `A` is _structurally orthogonal_ if, for every nonzero element `A[i, j]`, the group containing column `A[:, j]` has no other column with a nonzero in row `i`.
7
10
8
-
Thm 3.5: The function [`distance2_column_coloring`](@ref) applied to the [`BipartiteGraph`](@ref) of `A` should return a suitable coloring.
11
+
!!! warning
12
+
This function is not coded with efficiency in mind, it is designed for small-scale tests.
Return `true` if coloring the rows of the matrix `A` with the vector `colors` results in a partition that is structurally orthogonal, and `false` otherwise.
29
36
30
-
Def 3.2: A partition of the rows of a matrix `A` is _structurally orthogonal_ if, for every nonzero element `A[i, j]`, the group containing row `A[i, :]` has no other row with a nonzero in column `j`.
37
+
A partition of the rows of a matrix `A` is _structurally orthogonal_ if, for every nonzero element `A[i, j]`, the group containing row `A[i, :]` has no other row with a nonzero in column `j`.
31
38
32
-
Thm 3.5: The function [`distance2_row_coloring`](@ref) applied to the [`BipartiteGraph`](@ref) of `A` should return a suitable coloring.
39
+
!!! warning
40
+
This function is not coded with efficiency in mind, it is designed for small-scale tests.
Return `true` if coloring the columns of the symmetric matrix `A` with the vector `colors` results in a partition that is symmetrically orthogonal, and `false` otherwise.
53
64
54
-
Def 4.2: A partition of the columns of a symmetrix matrix `A` is _symmetrically orthogonal_ if, for every nonzero element `A[i, j]`, either
65
+
A partition of the columns of a symmetrix matrix `A` is _symmetrically orthogonal_ if, for every nonzero element `A[i, j]`, either
55
66
56
67
1. the group containing the column `A[:, j]` has no other column with a nonzero in row `i`
57
68
2. the group containing the column `A[:, i]` has no other column with a nonzero in row `j`
69
+
70
+
!!! warning
71
+
This function is not coded with efficiency in mind, it is designed for small-scale tests.
0 commit comments