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/decompression.jl
+89-14Lines changed: 89 additions & 14 deletions
Original file line number
Diff line number
Diff line change
@@ -124,7 +124,7 @@ end
124
124
"""
125
125
decompress!(
126
126
A::AbstractMatrix, B::AbstractMatrix,
127
-
result::AbstractColoringResult,
127
+
result::AbstractColoringResult, [uplo=:UL]
128
128
)
129
129
130
130
Decompress `B` in-place into `A`, given a coloring `result` of the sparsity pattern of `A`.
@@ -133,6 +133,8 @@ The out-of-place alternative is [`decompress`](@ref).
133
133
Compression means summing either the columns or the rows of `A` which share the same color.
134
134
It is done by calling [`compress`](@ref).
135
135
136
+
For `:symmetric` coloring results (and for those only), an optional positional argument `uplo in (:U, :L, :UL)` can be passed to specify which triangle of the matrix `A` should be updated: the upper one, the lower one, or both.
137
+
136
138
!!! note
137
139
In-place decompression is faster when `A isa SparseMatrixCSC`.
138
140
@@ -186,7 +188,7 @@ function decompress! end
186
188
"""
187
189
decompress_single_color!(
188
190
A::AbstractMatrix, b::AbstractVector, c::Integer,
189
-
result::AbstractColoringResult,
191
+
result::AbstractColoringResult, [uplo=:UL]
190
192
)
191
193
192
194
Decompress the vector `b` corresponding to color `c` in-place into `A`, given a coloring `result` of the sparsity pattern of `A`.
@@ -195,6 +197,8 @@ Decompress the vector `b` corresponding to color `c` in-place into `A`, given a
195
197
- If `result` comes from a `:nonsymmetric` structure with `:row` partition, this will update the rows of `A` that share color `c` (whose sum makes up `b`).
196
198
- If `result` comes from a `:symmetric` structure with `:column` partition, this will update the coefficients of `A` whose value is deduced from color `c`.
197
199
200
+
For `:symmetric` coloring results (and for those only), an optional positional argument `uplo in (:U, :L, :UL)` can be passed to specify which triangle of the matrix `A` should be updated: the upper one, the lower one, or both.
201
+
198
202
!!! warning
199
203
This function will only update some coefficients of `A`, without resetting the rest to zero.
0 commit comments