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
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.
277
-
For all nonzeros `A[i, j]`, `order_nonzeros[i, j]` provides its order of recovery.
277
+
For all nonzeros `A[i, j]`, `rank_nonzeros[i, j]` provides its rank of recovery.
278
278
279
279
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:
280
280
@@ -294,7 +294,7 @@ It is equivalent to an __acyclic coloring__.
294
294
"""
295
295
functionsubstitutable_columns(
296
296
A::AbstractMatrix,
297
-
order_nonzeros::AbstractMatrix,
297
+
rank_nonzeros::AbstractMatrix,
298
298
color::AbstractVector{<:Integer};
299
299
verbose::Bool=false,
300
300
)
@@ -308,7 +308,7 @@ function substitutable_columns(
308
308
iszero(A[i, j]) &&continue
309
309
ci, cj = color[i], color[j]
310
310
check =_substitutable_check(
311
-
A, order_nonzeros; i, j, ci, cj, row_group=group, column_group=group, verbose
311
+
A, rank_nonzeros; i, j, ci, cj, row_group=group, column_group=group, verbose
Return `true` if bicoloring of the matrix `A` with the vectors `row_color` and `column_color` results in a bipartition that is substitutable, and `false` otherwise.
325
-
For all nonzeros `A[i, j]`, `order_nonzeros[i, j]` provides its order of recovery.
325
+
For all nonzeros `A[i, j]`, `rank_nonzeros[i, j]` provides its rank of recovery.
326
326
327
327
A bipartition of the rows and columns of a matrix `A` is _substitutable_ if, for every nonzero element `A[i, j]`, either of the following statements holds:
328
328
@@ -336,7 +336,7 @@ It is equivalent to an __acyclic bicoloring__.
336
336
"""
337
337
functionsubstitutable_bidirectional(
338
338
A::AbstractMatrix,
339
-
order_nonzeros::AbstractMatrix,
339
+
rank_nonzeros::AbstractMatrix,
340
340
row_color::AbstractVector{<:Integer},
341
341
column_color::AbstractVector{<:Integer};
342
342
verbose::Bool=false,
@@ -350,7 +350,7 @@ function substitutable_bidirectional(
350
350
iszero(A[i, j]) &&continue
351
351
ci, cj = row_color[i], column_color[j]
352
352
check =_substitutable_check(
353
-
A, order_nonzeros; i, j, ci, cj, row_group, column_group, verbose
353
+
A, rank_nonzeros; i, j, ci, cj, row_group, column_group, verbose
354
354
)
355
355
!check &&returnfalse
356
356
end
@@ -359,7 +359,7 @@ end
359
359
360
360
function_substitutable_check(
361
361
A::AbstractMatrix,
362
-
order_nonzeros::AbstractMatrix;
362
+
rank_nonzeros::AbstractMatrix;
363
363
i::Integer,
364
364
j::Integer,
365
365
ci::Integer,
@@ -368,14 +368,14 @@ function _substitutable_check(
368
368
column_group::AbstractVector,
369
369
verbose::Bool,
370
370
)
371
-
order_ij =order_nonzeros[i, j]
371
+
order_ij =rank_nonzeros[i, j]
372
372
k_row =0
373
373
k_column =0
374
374
if ci !=0
375
375
for k in row_group[ci]
376
376
(k == i) &&continue
377
377
if!iszero(A[k, j])
378
-
order_kj =order_nonzeros[k, j]
378
+
order_kj =rank_nonzeros[k, j]
379
379
@assert!iszero(order_kj)
380
380
if order_kj > order_ij
381
381
k_row = k
@@ -387,7 +387,7 @@ function _substitutable_check(
387
387
for k in column_group[cj]
388
388
(k == j) &&continue
389
389
if!iszero(A[i, k])
390
-
order_ik =order_nonzeros[i, k]
390
+
order_ik =rank_nonzeros[i, k]
391
391
@assert!iszero(order_ik)
392
392
if order_ik > order_ij
393
393
k_column = k
@@ -500,3 +500,75 @@ function valid_dynamic_order(
0 commit comments