11//! Modified Gram-Schmit orthogonalizer
22
3- use crate :: { generate :: * , inner :: * , norm :: Norm , types :: * } ;
4- use ndarray :: * ;
3+ use super :: * ;
4+ use crate :: { generate :: * , inner :: * , norm :: Norm } ;
55
66/// Iterative orthogonalizer using modified Gram-Schmit procedure
77#[ derive( Debug , Clone ) ]
@@ -12,20 +12,6 @@ pub struct MGS<A> {
1212 q : Vec < Array1 < A > > ,
1313}
1414
15- /// Q-matrix
16- ///
17- /// - Maybe **NOT** square
18- /// - Unitary for existing columns
19- ///
20- pub type Q < A > = Array2 < A > ;
21-
22- /// R-matrix
23- ///
24- /// - Maybe **NOT** square
25- /// - Upper triangle
26- ///
27- pub type R < A > = Array2 < A > ;
28-
2915impl < A : Scalar > MGS < A > {
3016 /// Create an empty orthogonalizer
3117 pub fn new ( dimension : usize ) -> Self {
@@ -129,27 +115,6 @@ impl<A: Scalar> MGS<A> {
129115 }
130116}
131117
132- /// Strategy for linearly dependent vectors appearing in iterative QR decomposition
133- #[ derive( Clone , Copy , Debug , Eq , PartialEq ) ]
134- pub enum Strategy {
135- /// Terminate iteration if dependent vector comes
136- Terminate ,
137-
138- /// Skip dependent vector
139- Skip ,
140-
141- /// Orthogonalize dependent vector without adding to Q,
142- /// i.e. R must be non-square like following:
143- ///
144- /// ```text
145- /// x x x x x
146- /// 0 x x x x
147- /// 0 0 0 x x
148- /// 0 0 0 0 x
149- /// ```
150- Full ,
151- }
152-
153118/// Online QR decomposition of vectors using modified Gram-Schmit algorithm
154119pub fn mgs < A , S > (
155120 iter : impl Iterator < Item = ArrayBase < S , Ix1 > > ,
0 commit comments