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
Copy file name to clipboardExpand all lines: src/check.jl
+127-1Lines changed: 127 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -86,11 +86,15 @@ A partition of the columns of a symmetric matrix `A` is _symmetrically orthogona
86
86
1. the group containing the column `A[:, j]` has no other column with a nonzero in row `i`
87
87
2. the group containing the column `A[:, i]` has no other column with a nonzero in row `j`
88
88
89
+
It is equivalent to a __star coloring__.
90
+
89
91
!!! warning
90
92
This function is not coded with efficiency in mind, it is designed for small-scale tests.
91
93
92
94
# References
93
95
96
+
> [_On the Estimation of Sparse Hessian Matrices_](https://doi.org/10.1137/0716078), Powell and Toint (1979)
97
+
> [_Estimation of sparse hessian matrices and graph coloring problems_](https://doi.org/10.1007/BF02612334), Coleman and Moré (1984)
94
98
> [_What Color Is Your Jacobian? Graph Coloring for Computing Derivatives_](https://epubs.siam.org/doi/10.1137/S0036144504444711), Gebremedhin et al. (2005)
95
99
"""
96
100
functionsymmetrically_orthogonal_columns(
@@ -102,7 +106,7 @@ function symmetrically_orthogonal_columns(
102
106
end
103
107
issymmetric(A) ||returnfalse
104
108
group =group_by_color(color)
105
-
for i inaxes(A, 2), j inaxes(A, 2)
109
+
for i inaxes(A, 1), j inaxes(A, 2)
106
110
iszero(A[i, j]) &&continue
107
111
ci, cj = color[i], color[j]
108
112
check =_bilateral_check(
@@ -261,6 +265,128 @@ function directly_recoverable_columns(
Return `true` if coloring the columns of the symmetric matrix `A` with the vector `color` results in a partition that is substitutable, and `false` otherwise.
275
+
For all nonzeros `A[i, j]`, `order_nonzeros[i, j]` provides its order of recovery.
276
+
277
+
A partition of the columns of a symmetric matrix `A` is _substitutable_ if, for every nonzero element `A[i, j]`, either of the following statements holds:
278
+
279
+
1. the group containing the column `A[:, j]` has all nonzeros in row `i` ordered before `A[i, j]`
280
+
2. the group containing the column `A[:, i]` has all nonzeros in row `j` ordered before `A[i, j]`
281
+
282
+
It is equivalent to an __acyclic coloring__.
283
+
284
+
!!! warning
285
+
This function is not coded with efficiency in mind, it is designed for small-scale tests.
286
+
287
+
# References
288
+
289
+
> [_On the Estimation of Sparse Hessian Matrices_](https://doi.org/10.1137/0716078), Powell and Toint (1979)
290
+
> [_The Cyclic Coloring Problem and Estimation of Sparse Hessian Matrices_](https://doi.org/10.1137/0607026), Coleman and Cai (1986)
291
+
> [_What Color Is Your Jacobian? Graph Coloring for Computing Derivatives_](https://epubs.siam.org/doi/10.1137/S0036144504444711), Gebremedhin et al. (2005)
0 commit comments