Skip to content

Commit f25067b

Browse files
committed
Fix documents
1 parent 6c92d3c commit f25067b

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

src/mgs.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,8 @@ impl<A: Scalar> MGS<A> {
4444
///
4545
/// Panic
4646
/// -------
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+
///
4849
pub fn orthogonalize<S>(&self, a: &mut ArrayBase<S, Ix1>) -> Array1<A>
4950
where
5051
A: Lapack,
@@ -67,7 +68,7 @@ impl<A: Scalar> MGS<A> {
6768
///
6869
/// Panic
6970
/// -------
70-
/// - if the size of the input array mismaches to the dimension
71+
/// - if the size of the input array mismatches to the dimension
7172
///
7273
/// ```rust
7374
/// # use ndarray::*;
@@ -79,7 +80,7 @@ impl<A: Scalar> MGS<A> {
7980
/// let coef = mgs.append(array![1.0, 1.0, 0.0], 1e-9).unwrap();
8081
/// close_l2(&coef, &array![1.0, 1.0], 1e-9);
8182
///
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
8384
///
8485
/// if let Err(coef) = mgs.append(array![1.0, 2.0, 0.0], 1e-9) {
8586
/// 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 {
117118
/// Skip dependent vector
118119
Skip,
119120

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:
122123
///
123124
/// ```text
124125
/// x x x x x
125126
/// 0 x x x x
126127
/// 0 0 0 x x
127128
/// 0 0 0 0 x
128-
/// 0 0 0 0 0 // 0-filled to be square matrix
129129
/// ```
130130
Full,
131131
}

0 commit comments

Comments
 (0)