@@ -14,27 +14,56 @@ function MatrixAlgebraKit.initialize_output(
14
14
)
15
15
return nothing
16
16
end
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
+ )
20
23
return nothing
21
24
end
22
25
23
26
function 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
+ )
24
32
alg′ = select_algorithm (qr_compact!, A, alg)
25
33
return qr_compact! (A, alg′)
26
34
end
27
35
function 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
+ )
28
41
alg′ = select_algorithm (left_polar!, A, alg)
29
42
return left_polar! (A, alg′)
30
43
end
31
44
function MatrixAlgebraKit. left_orth_svd! (
32
45
A:: AbstractBlockSparseMatrix , F, alg, trunc:: Nothing = nothing
33
46
)
47
+ ! isnothing (F) && throw (
48
+ ArgumentError (
49
+ " `left_orth!` on block sparse matrices does not support specifying the output"
50
+ ),
51
+ )
34
52
alg′ = select_algorithm (svd_compact!, A, alg)
35
53
U, S, Vᴴ = svd_compact! (A, alg′)
36
54
return U, S * Vᴴ
37
55
end
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
38
67
39
68
function MatrixAlgebraKit. initialize_output (
40
69
:: typeof (right_orth!), A:: AbstractBlockSparseMatrix
44
73
function MatrixAlgebraKit. check_input (
45
74
:: typeof (right_orth!), A:: AbstractBlockSparseMatrix , F:: Nothing
46
75
)
76
+ ! isnothing (F) && throw (
77
+ ArgumentError (
78
+ " `right_orth!` on block sparse matrices does not support specifying the output"
79
+ ),
80
+ )
47
81
return nothing
48
82
end
49
83
50
84
function 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
+ )
51
90
alg′ = select_algorithm (lq_compact!, A, alg)
52
91
return lq_compact! (A, alg′)
53
92
end
54
93
function 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
+ )
55
99
alg′ = select_algorithm (right_polar!, A, alg)
56
100
return right_polar! (A, alg′)
57
101
end
58
102
function MatrixAlgebraKit. right_orth_svd! (
59
103
A:: AbstractBlockSparseMatrix , F, alg, trunc:: Nothing = nothing
60
104
)
105
+ ! isnothing (F) && throw (
106
+ ArgumentError (
107
+ " `right_orth!` on block sparse matrices does not support specifying the output"
108
+ ),
109
+ )
61
110
alg′ = select_algorithm (svd_compact!, A, alg)
62
111
U, S, Vᴴ = svd_compact! (A, alg′)
63
112
return U * S, Vᴴ
64
113
end
65
114
function 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
+ )
66
120
alg′ = select_algorithm (svd_compact!, A, alg)
67
121
alg_trunc = select_algorithm (svd_trunc!, A, alg′; trunc)
68
122
U, S, Vᴴ = svd_trunc! (A, alg_trunc)
0 commit comments