@@ -44,7 +44,8 @@ impl<A: Scalar> MGS<A> {
44
44
///
45
45
/// Panic
46
46
/// -------
47
- /// - if the size of the input array mismaches to the dimension
47
+ /// - if the size of the input array mismatches to the dimension
48
+ ///
48
49
pub fn orthogonalize < S > ( & self , a : & mut ArrayBase < S , Ix1 > ) -> Array1 < A >
49
50
where
50
51
A : Lapack ,
@@ -67,7 +68,7 @@ impl<A: Scalar> MGS<A> {
67
68
///
68
69
/// Panic
69
70
/// -------
70
- /// - if the size of the input array mismaches to the dimension
71
+ /// - if the size of the input array mismatches to the dimension
71
72
///
72
73
/// ```rust
73
74
/// # use ndarray::*;
@@ -79,7 +80,7 @@ impl<A: Scalar> MGS<A> {
79
80
/// let coef = mgs.append(array![1.0, 1.0, 0.0], 1e-9).unwrap();
80
81
/// close_l2(&coef, &array![1.0, 1.0], 1e-9);
81
82
///
82
- /// assert!(mgs.append(array![1.0, 2.0, 0.0], 1e-9).is_err()); // Fail if the vector is linearly dependend
83
+ /// assert!(mgs.append(array![1.0, 2.0, 0.0], 1e-9).is_err()); // Fail if the vector is linearly dependent
83
84
///
84
85
/// if let Err(coef) = mgs.append(array![1.0, 2.0, 0.0], 1e-9) {
85
86
/// close_l2(&coef, &array![2.0, 1.0, 0.0], 1e-9); // You can get coefficients of dependent vector
@@ -117,15 +118,14 @@ pub enum Strategy {
117
118
/// Skip dependent vector
118
119
Skip ,
119
120
120
- /// Orghotonalize dependent vector without adding to Q,
121
- /// thus R must be non-regular like following:
121
+ /// Orthogonalize dependent vector without adding to Q,
122
+ /// i.e. R must be non-square like following:
122
123
///
123
124
/// ```text
124
125
/// x x x x x
125
126
/// 0 x x x x
126
127
/// 0 0 0 x x
127
128
/// 0 0 0 0 x
128
- /// 0 0 0 0 0 // 0-filled to be square matrix
129
129
/// ```
130
130
Full ,
131
131
}
0 commit comments