@@ -14,27 +14,56 @@ function MatrixAlgebraKit.initialize_output(
1414)
1515 return nothing
1616end
17- function MatrixAlgebraKit. check_input (
18- :: typeof (left_orth!), A:: AbstractBlockSparseMatrix , F:: Nothing
19- )
17+ function MatrixAlgebraKit. check_input (:: typeof (left_orth!), A:: AbstractBlockSparseMatrix , F)
18+ ! isnothing (F) && throw (
19+ ArgumentError (
20+ " `left_orth!` on block sparse matrices does not support specifying the output"
21+ ),
22+ )
2023 return nothing
2124end
2225
2326function MatrixAlgebraKit. left_orth_qr! (A:: AbstractBlockSparseMatrix , F, alg)
27+ ! isnothing (F) && throw (
28+ ArgumentError (
29+ " `left_orth!` on block sparse matrices does not support specifying the output"
30+ ),
31+ )
2432 alg′ = select_algorithm (qr_compact!, A, alg)
2533 return qr_compact! (A, alg′)
2634end
2735function MatrixAlgebraKit. left_orth_polar! (A:: AbstractBlockSparseMatrix , F, alg)
36+ ! isnothing (F) && throw (
37+ ArgumentError (
38+ " `left_orth!` on block sparse matrices does not support specifying the output"
39+ ),
40+ )
2841 alg′ = select_algorithm (left_polar!, A, alg)
2942 return left_polar! (A, alg′)
3043end
3144function MatrixAlgebraKit. left_orth_svd! (
3245 A:: AbstractBlockSparseMatrix , F, alg, trunc:: Nothing = nothing
3346)
47+ ! isnothing (F) && throw (
48+ ArgumentError (
49+ " `left_orth!` on block sparse matrices does not support specifying the output"
50+ ),
51+ )
3452 alg′ = select_algorithm (svd_compact!, A, alg)
3553 U, S, Vᴴ = svd_compact! (A, alg′)
3654 return U, S * Vᴴ
3755end
56+ function MatrixAlgebraKit. left_orth_svd! (A:: AbstractBlockSparseMatrix , F, alg, trunc)
57+ ! isnothing (F) && throw (
58+ ArgumentError (
59+ " `left_orth!` on block sparse matrices does not support specifying the output"
60+ ),
61+ )
62+ alg′ = select_algorithm (svd_compact!, A, alg)
63+ alg_trunc = select_algorithm (svd_trunc!, A, alg′; trunc)
64+ U, S, Vᴴ = svd_trunc! (A, alg_trunc)
65+ return U, S * Vᴴ
66+ end
3867
3968function MatrixAlgebraKit. initialize_output (
4069 :: typeof (right_orth!), A:: AbstractBlockSparseMatrix
4473function MatrixAlgebraKit. check_input (
4574 :: typeof (right_orth!), A:: AbstractBlockSparseMatrix , F:: Nothing
4675)
76+ ! isnothing (F) && throw (
77+ ArgumentError (
78+ " `right_orth!` on block sparse matrices does not support specifying the output"
79+ ),
80+ )
4781 return nothing
4882end
4983
5084function MatrixAlgebraKit. right_orth_lq! (A:: AbstractBlockSparseMatrix , F, alg)
85+ ! isnothing (F) && throw (
86+ ArgumentError (
87+ " `right_orth!` on block sparse matrices does not support specifying the output"
88+ ),
89+ )
5190 alg′ = select_algorithm (lq_compact!, A, alg)
5291 return lq_compact! (A, alg′)
5392end
5493function MatrixAlgebraKit. right_orth_polar! (A:: AbstractBlockSparseMatrix , F, alg)
94+ ! isnothing (F) && throw (
95+ ArgumentError (
96+ " `right_orth!` on block sparse matrices does not support specifying the output"
97+ ),
98+ )
5599 alg′ = select_algorithm (right_polar!, A, alg)
56100 return right_polar! (A, alg′)
57101end
58102function MatrixAlgebraKit. right_orth_svd! (
59103 A:: AbstractBlockSparseMatrix , F, alg, trunc:: Nothing = nothing
60104)
105+ ! isnothing (F) && throw (
106+ ArgumentError (
107+ " `right_orth!` on block sparse matrices does not support specifying the output"
108+ ),
109+ )
61110 alg′ = select_algorithm (svd_compact!, A, alg)
62111 U, S, Vᴴ = svd_compact! (A, alg′)
63112 return U * S, Vᴴ
64113end
65114function MatrixAlgebraKit. right_orth_svd! (A:: AbstractBlockSparseMatrix , F, alg, trunc)
115+ ! isnothing (F) && throw (
116+ ArgumentError (
117+ " `right_orth!` on block sparse matrices does not support specifying the output"
118+ ),
119+ )
66120 alg′ = select_algorithm (svd_compact!, A, alg)
67121 alg_trunc = select_algorithm (svd_trunc!, A, alg′; trunc)
68122 U, S, Vᴴ = svd_trunc! (A, alg_trunc)
0 commit comments