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 4e84acb commit ff10bb4Copy full SHA for ff10bb4
src/krylov/householder.rs
@@ -1,5 +1,6 @@
1
use super::*;
2
use crate::{inner::*, norm::*};
3
+use num_traits::Zero;
4
5
/// Iterative orthogonalizer using Householder reflection
6
#[derive(Debug, Clone)]
@@ -47,6 +48,10 @@ impl<A: Scalar + Lapack> Orthogonalizer for Householder<A> {
47
48
for k in 0..self.len() {
49
self.reflect(k, a);
50
}
51
+ if a.len() >= self.len() {
52
+ // full rank
53
+ return Zero::zero();
54
+ }
55
// residual norm
56
a.slice(s![self.len()..]).norm_l2()
57
0 commit comments