Skip to content

Commit 6a74fc9

Browse files
committed
Fill documents
1 parent 75e9e22 commit 6a74fc9

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

src/krylov/arnoldi.rs

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,10 @@ use crate::norm::Norm;
33
use num_traits::One;
44
use std::iter::*;
55

6+
/// Execute Arnodi iteration as Rust iterator
7+
///
8+
/// - [Arnoldi iteration - Wikipedia](https://en.wikipedia.org/wiki/Arnoldi_iteration)
9+
///
610
pub struct Arnoldi<A, S, F, Ortho>
711
where
812
A: Scalar,
@@ -11,9 +15,11 @@ where
1115
Ortho: Orthogonalizer<Elem = A>,
1216
{
1317
a: F,
18+
/// Next vector (normalized `|v|=1`)
1419
v: ArrayBase<S, Ix1>,
20+
/// Orthogonalizer
1521
ortho: Ortho,
16-
/// Coefficients
22+
/// Coefficients to be composed into H-matrix
1723
h: Vec<Array1<A>>,
1824
}
1925

@@ -99,6 +105,7 @@ where
99105
}
100106
}
101107

108+
/// Utility to execute Arnoldi iteration with Householder reflection
102109
pub fn arnoldi_householder<A, S1, S2>(a: ArrayBase<S1, Ix2>, v: ArrayBase<S2, Ix1>, tol: A::Real) -> (Q<A>, H<A>)
103110
where
104111
A: Scalar + Lapack,
@@ -109,6 +116,7 @@ where
109116
Arnoldi::new(mul_mat(a), v, householder).complete()
110117
}
111118

119+
/// Utility to execute Arnoldi iteration with modified Gram-Schmit orthogonalizer
112120
pub fn arnoldi_mgs<A, S1, S2>(a: ArrayBase<S1, Ix2>, v: ArrayBase<S2, Ix1>, tol: A::Real) -> (Q<A>, H<A>)
113121
where
114122
A: Scalar + Lapack,

0 commit comments

Comments
 (0)