Skip to content

Commit 7bb29be

Browse files
authored
Merge pull request #17 from jannschu/fix-typos
Fix typos in comments and documenation
2 parents e669f29 + 7d232ba commit 7bb29be

File tree

4 files changed

+11
-11
lines changed

4 files changed

+11
-11
lines changed

README.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ assert!(report.termination.was_successful());
4747

4848
# References
4949

50-
Sofware:
50+
Software:
5151

5252
- The [MINPACK](https://www.netlib.org/minpack/) Fortran implementation.
5353
- A C version/update, [lmfit][lmfit].
@@ -59,7 +59,7 @@ One original reference for the algorithm seems to be
5959
6060
by one of the authors of MINPACK.
6161

62-
The algorihm is also described in the form as
62+
The algorithm is also described in the form as
6363
implemented by this crate in the [book "Numerical Optimization"](https://link.springer.com/book/10.1007%2F978-0-387-40065-5) by Nocedal and Wright, chapters 4 and 10.
6464

65-
[lmfit]: https://github.com/pkgw/pwkit/blob/master/pwkit/lmmin.py
65+
[lmfit]: https://jugit.fz-juelich.de/mlz/lmfit

src/lm.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,7 @@ impl<F: RealField + Float> LevenbergMarquardt<F> {
182182
/// \quad\text{for all }i=1,\ldots,n.
183183
/// ```
184184
///
185-
/// This is based on the fact that those vectors are orthognal near the optimum (gradient is zero).
185+
/// This is based on the fact that those vectors are orthogonal near the optimum (gradient is zero).
186186
/// The angle check is scale invariant, whereas checking that
187187
/// `$\nabla f(\vec{x})\approx \vec{0}$` is not.
188188
///
@@ -250,7 +250,7 @@ impl<F: RealField + Float> LevenbergMarquardt<F> {
250250

251251
/// Try to solve the given least squares problem.
252252
///
253-
/// The paramters of the problem which are set when this function is called
253+
/// The parameters of the problem which are set when this function is called
254254
/// are used as the initial guess for `$\vec{x}$`.
255255
pub fn minimize<N, M, O>(&self, target: O) -> (O, MinimizationReport<F>)
256256
where
@@ -290,7 +290,7 @@ impl<F: RealField + Float> LevenbergMarquardt<F> {
290290
determine_lambda_and_parameter_update(&mut lls, &lm.diag, lm.delta, lm.lambda);
291291
let tr_iteration = lm.trust_region_iteration(&mut lls, param);
292292
match tr_iteration {
293-
// successful paramter update, break and recompute Jacobian
293+
// successful parameter update, break and recompute Jacobian
294294
Ok(Some(residuals)) => break residuals,
295295
// terminate (either success or failure)
296296
Err(reason) => return lm.into_report(reason),

src/qr.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ where
4242
qr: Matrix<F, M, N, S>,
4343
/// Diagonal entries of R
4444
r_diag: OVector<F, N>,
45-
/// Permution matrix. Entry `$i$` specifies which column of the identity
45+
/// Permutation matrix. Entry `$i$` specifies which column of the identity
4646
/// matrix to use.
4747
permutation: OVector<usize, N>,
4848
work: OVector<F, N>,
@@ -211,7 +211,7 @@ where
211211
upper_r: OMatrix<F, DimMaximum<M, N>, N>,
212212
/// Diagonal entries of `$\mathbf{L}$`.
213213
l_diag: OVector<F, N>,
214-
/// Permution matrix. Entry `$i$` specifies which column of the identity
214+
/// Permutation matrix. Entry `$i$` specifies which column of the identity
215215
/// matrix to use.
216216
permutation: OVector<usize, N>,
217217
pub(crate) column_norms: OVector<F, N>,
@@ -364,7 +364,7 @@ where
364364
mut out: OVector<F, N>,
365365
) -> (OVector<F, N>, CholeskyFactor<F, M, N>) {
366366
out.copy_from(&self.qt_b);
367-
let mut rhs = self.eliminate_diag(diag, out /* will be filled and returnd */);
367+
let mut rhs = self.eliminate_diag(diag, out /* will be filled and returned */);
368368
core::mem::swap(&mut self.work, &mut rhs);
369369
self.solve_after_elimination(rhs)
370370
}

src/utils.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -35,10 +35,10 @@ cfg_if::cfg_if! {
3535
/// You can try to check your derivative implementation of an
3636
/// [`LeastSquaresProblem`](trait.LeastSquaresProblem.html) with this.
3737
///
38-
/// Computing the derivatives numerically is unstable: You can construct
38+
/// Computing the derivatives numerically is numerically unstable: You can construct
3939
/// functions where the computed result is far off. If you
4040
/// observe large differences between the derivative computed by this function
41-
/// and your implementation the reason _might_ be due to instabilty.
41+
/// and your implementation the reason _might_ be due to instability.
4242
///
4343
/// The achieved precision by this function
4444
/// is lower than the floating point precision in general. So the error is bigger

0 commit comments

Comments
 (0)