|
1 | 1 | using MatrixAlgebraKit: |
2 | 2 | MatrixAlgebraKit, |
| 3 | + default_svd_algorithm, |
| 4 | + left_null!, |
| 5 | + left_null_svd!, |
3 | 6 | left_orth!, |
4 | 7 | left_polar!, |
5 | 8 | lq_compact!, |
| 9 | + null_truncation_strategy, |
6 | 10 | qr_compact!, |
| 11 | + right_null!, |
| 12 | + right_null_svd!, |
7 | 13 | right_orth!, |
8 | 14 | right_polar!, |
9 | 15 | select_algorithm, |
@@ -122,3 +128,50 @@ function MatrixAlgebraKit.right_orth_svd!(A::AbstractBlockSparseMatrix, F, alg, |
122 | 128 | U, S, Vᴴ = svd_trunc!(A, alg_trunc) |
123 | 129 | return U * S, Vᴴ |
124 | 130 | end |
| 131 | + |
| 132 | +function MatrixAlgebraKit.initialize_output( |
| 133 | + ::typeof(left_null!), A::AbstractBlockSparseMatrix |
| 134 | +) |
| 135 | + return nothing |
| 136 | +end |
| 137 | +function MatrixAlgebraKit.check_input( |
| 138 | + ::typeof(left_null!), A::AbstractBlockSparseMatrix, N::Nothing |
| 139 | +) |
| 140 | + return nothing |
| 141 | +end |
| 142 | +function MatrixAlgebraKit.left_null_qr!(A::AbstractBlockSparseMatrix, N, alg) |
| 143 | + return left_null_svd!(A, N, default_svd_algorithm(A)) |
| 144 | +end |
| 145 | +function MatrixAlgebraKit.left_null_svd!( |
| 146 | + A::AbstractBlockSparseMatrix, N, alg, trunc::Nothing |
| 147 | +) |
| 148 | + return left_null_svd!(A, N, alg, null_truncation_strategy(; atol=0, rtol=0)) |
| 149 | +end |
| 150 | +function MatrixAlgebraKit.truncate!( |
| 151 | + ::typeof(left_null!), |
| 152 | + (U, S)::Tuple{AbstractBlockSparseMatrix,AbstractBlockSparseMatrix}, |
| 153 | + strategy::TruncationStrategy, |
| 154 | +) |
| 155 | + return error("Not implemented.") |
| 156 | +end |
| 157 | + |
| 158 | +function MatrixAlgebraKit.initialize_output( |
| 159 | + ::typeof(right_null!), A::AbstractBlockSparseMatrix |
| 160 | +) |
| 161 | + return nothing |
| 162 | +end |
| 163 | +function MatrixAlgebraKit.check_input( |
| 164 | + ::typeof(right_null!), A::AbstractBlockSparseMatrix, N::Nothing |
| 165 | +) |
| 166 | + return nothing |
| 167 | +end |
| 168 | +function MatrixAlgebraKit.right_null_lq!(A::AbstractBlockSparseMatrix, N, alg) |
| 169 | + return error("Not implement.") |
| 170 | +end |
| 171 | +function MatrixAlgebraKit.truncate!( |
| 172 | + ::typeof(right_null!), |
| 173 | + (S, Vᴴ)::Tuple{AbstractBlockSparseMatrix,AbstractBlockSparseMatrix}, |
| 174 | + strategy::TruncationStrategy, |
| 175 | +) |
| 176 | + return error("Not implemented.") |
| 177 | +end |
0 commit comments