File tree Expand file tree Collapse file tree 1 file changed +5
-12
lines changed Expand file tree Collapse file tree 1 file changed +5
-12
lines changed Original file line number Diff line number Diff line change 4141
4242for f in [:eig_trunc! , :eigh_trunc! ]
4343 @eval begin
44- function MatrixAlgebraKit. $f (
45- A :: AbstractBlockSparseMatrix ,
46- out ,
47- alg :: TruncatedAlgorithm{<:BlockPermutedDiagonalAlgorithm} ,
44+ function MatrixAlgebraKit. truncate! (
45+ :: typeof ( $ f) ,
46+ (D, V) :: NTuple{2,AbstractBlockSparseMatrix} ,
47+ strategy :: TruncationStrategy ,
4848 )
49- Ad, (invrowperm, invcolperm) = blockdiagonalize (A)
50- blockalg = BlockDiagonalAlgorithm (alg. alg)
51- blockstrategy = BlockDiagonalTruncationStrategy (alg. trunc)
52- Dd, Vd = $ f (Ad, TruncatedAlgorithm (blockalg, blockstrategy))
53-
54- D = transform_rows (Dd, invrowperm)
55- V = transform_cols (Vd, invcolperm)
56- return D, V
49+ return truncate! ($ f, (D, V), BlockDiagonalTruncationStrategy (strategy))
5750 end
5851 end
5952end
You can’t perform that action at this time.
0 commit comments