@@ -89,36 +89,6 @@ function distance2_row_coloring(g::BipartiteGraph)
8989 return colors
9090end
9191
92- function check_structurally_orthogonal_columns (
93- A:: AbstractMatrix , colors:: AbstractVector{<:Integer}
94- )
95- for c in unique (colors)
96- js = filter (j -> colors[j] == c, axes (A, 2 ))
97- Ajs = @view A[:, js]
98- nonzeros_per_row = count (! iszero, Ajs; dims= 2 )
99- if maximum (nonzeros_per_row) > 1
100- @warn " Color $c has columns $js sharing nonzeros"
101- return false
102- end
103- end
104- return true
105- end
106-
107- function check_structurally_orthogonal_rows (
108- A:: AbstractMatrix , colors:: AbstractVector{<:Integer}
109- )
110- for c in unique (colors)
111- is = filter (i -> colors[i] == c, axes (A, 1 ))
112- Ais = @view A[is, :]
113- nonzeros_per_column = count (! iszero, Ais; dims= 1 )
114- if maximum (nonzeros_per_column) > 1
115- @warn " Color $c has rows $is sharing nonzeros"
116- return false
117- end
118- end
119- return true
120- end
121-
12292# # Hessian coloring
12393
12494"""
@@ -189,30 +159,6 @@ function star_coloring(g::AdjacencyGraph)
189159 return colors
190160end
191161
192- function check_symmetrically_structurally_orthogonal (
193- A:: AbstractMatrix , colors:: AbstractVector{<:Integer}
194- )
195- for i in axes (A, 2 ), j in axes (A, 2 )
196- if ! iszero (A[i, j])
197- group_i = filter (i2 -> (i2 != i) && (colors[i2] == colors[i]), axes (A, 2 ))
198- group_j = filter (j2 -> (j2 != j) && (colors[j2] == colors[j]), axes (A, 2 ))
199- A_group_i_column_j = @view A[group_i, j]
200- A_group_j_column_i = @view A[group_j, i]
201- nonzeros_group_i_column_j = count (! iszero, A_group_i_column_j)
202- nonzeros_group_j_column_i = count (! iszero, A_group_j_column_i)
203- if nonzeros_group_i_column_j > 0 && nonzeros_group_j_column_i > 0
204- @warn """
205- For coefficient $((i, j)) , both of the following have confounding zeros:
206- - color $(colors[j]) with group $group_j
207- - color $(colors[i]) with group $group_i
208- """
209- return false
210- end
211- end
212- end
213- return true
214- end
215-
216162# # ADTypes overloads
217163
218164"""
0 commit comments