We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent dfa1c46 commit 0c9f42dCopy full SHA for 0c9f42d
src/factorizations/truncation.jl
@@ -1,5 +1,15 @@
1
using MatrixAlgebraKit: TruncationStrategy, diagview, svd_trunc!
2
3
+function MatrixAlgebraKit.diagview(A::BlockSparseMatrix{T,Diagonal{T,Vector{T}}}) where {T}
4
+ D = BlockSparseVector{T}(undef, axes(A, 1))
5
+ for I in eachblockstoredindex(A)
6
+ if ==(Int.(Tuple(I))...)
7
+ D[Tuple(I)[1]] = diagview(A[I])
8
+ end
9
10
+ return D
11
+end
12
+
13
"""
14
BlockPermutedDiagonalTruncationStrategy(strategy::TruncationStrategy)
15
0 commit comments