Skip to content

Commit 0183803

Browse files
Fix some typos. (#1428)
1 parent ed9d9cc commit 0183803

File tree

9 files changed

+27
-27
lines changed

9 files changed

+27
-27
lines changed

benches/core/vector.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ fn vec10000_axpy_f64_static(bh: &mut criterion::Criterion) {
9696
let b = SVector::<f64, 10000>::new_random();
9797
let n = rng.gen::<f64>();
9898

99-
// NOTE: for some reasons, it is much faster if the arument are boxed (Box::new(OVector...)).
99+
// NOTE: for some reasons, it is much faster if the argument are boxed (Box::new(OVector...)).
100100
bh.bench_function("vec10000_axpy_f64_static", move |bh| {
101101
bh.iter(|| a.axpy(n, &b, 1.0))
102102
});

benches/lib.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ pub mod core;
1414
pub mod geometry;
1515
pub mod linalg;
1616

17-
fn reproductible_dmatrix(nrows: usize, ncols: usize) -> DMatrix<f64> {
17+
fn reproducible_dmatrix(nrows: usize, ncols: usize) -> DMatrix<f64> {
1818
use rand::SeedableRng;
1919
let mut rng = IsaacRng::seed_from_u64(0);
2020
DMatrix::<f64>::from_fn(nrows, ncols, |_, _| rng.gen())

benches/linalg/schur.rs

+6-6
Original file line numberDiff line numberDiff line change
@@ -8,21 +8,21 @@ fn schur_decompose_4x4(bh: &mut criterion::Criterion) {
88
}
99

1010
fn schur_decompose_10x10(bh: &mut criterion::Criterion) {
11-
let m = crate::reproductible_dmatrix(10, 10);
11+
let m = crate::reproducible_dmatrix(10, 10);
1212
bh.bench_function("schur_decompose_10x10", move |bh| {
1313
bh.iter(|| std::hint::black_box(Schur::new(m.clone())))
1414
});
1515
}
1616

1717
fn schur_decompose_100x100(bh: &mut criterion::Criterion) {
18-
let m = crate::reproductible_dmatrix(100, 100);
18+
let m = crate::reproducible_dmatrix(100, 100);
1919
bh.bench_function("schur_decompose_100x100", move |bh| {
2020
bh.iter(|| std::hint::black_box(Schur::new(m.clone())))
2121
});
2222
}
2323

2424
fn schur_decompose_200x200(bh: &mut criterion::Criterion) {
25-
let m = crate::reproductible_dmatrix(200, 200);
25+
let m = crate::reproducible_dmatrix(200, 200);
2626
bh.bench_function("schur_decompose_200x200", move |bh| {
2727
bh.iter(|| std::hint::black_box(Schur::new(m.clone())))
2828
});
@@ -36,21 +36,21 @@ fn eigenvalues_4x4(bh: &mut criterion::Criterion) {
3636
}
3737

3838
fn eigenvalues_10x10(bh: &mut criterion::Criterion) {
39-
let m = crate::reproductible_dmatrix(10, 10);
39+
let m = crate::reproducible_dmatrix(10, 10);
4040
bh.bench_function("eigenvalues_10x10", move |bh| {
4141
bh.iter(|| std::hint::black_box(m.complex_eigenvalues()))
4242
});
4343
}
4444

4545
fn eigenvalues_100x100(bh: &mut criterion::Criterion) {
46-
let m = crate::reproductible_dmatrix(100, 100);
46+
let m = crate::reproducible_dmatrix(100, 100);
4747
bh.bench_function("eigenvalues_100x100", move |bh| {
4848
bh.iter(|| std::hint::black_box(m.complex_eigenvalues()))
4949
});
5050
}
5151

5252
fn eigenvalues_200x200(bh: &mut criterion::Criterion) {
53-
let m = crate::reproductible_dmatrix(200, 200);
53+
let m = crate::reproducible_dmatrix(200, 200);
5454
bh.bench_function("eigenvalues_200x200", move |bh| {
5555
bh.iter(|| std::hint::black_box(m.complex_eigenvalues()))
5656
});

benches/linalg/svd.rs

+12-12
Original file line numberDiff line numberDiff line change
@@ -22,21 +22,21 @@ fn svd_decompose_4x4(bh: &mut criterion::Criterion) {
2222
}
2323

2424
fn svd_decompose_10x10(bh: &mut criterion::Criterion) {
25-
let m = crate::reproductible_dmatrix(10, 10);
25+
let m = crate::reproducible_dmatrix(10, 10);
2626
bh.bench_function("svd_decompose_10x10", move |bh| {
2727
bh.iter(|| std::hint::black_box(SVD::new(m.clone(), true, true)))
2828
});
2929
}
3030

3131
fn svd_decompose_100x100(bh: &mut criterion::Criterion) {
32-
let m = crate::reproductible_dmatrix(100, 100);
32+
let m = crate::reproducible_dmatrix(100, 100);
3333
bh.bench_function("svd_decompose_100x100", move |bh| {
3434
bh.iter(|| std::hint::black_box(SVD::new(m.clone(), true, true)))
3535
});
3636
}
3737

3838
fn svd_decompose_200x200(bh: &mut criterion::Criterion) {
39-
let m = crate::reproductible_dmatrix(200, 200);
39+
let m = crate::reproducible_dmatrix(200, 200);
4040
bh.bench_function("svd_decompose_200x200", move |bh| {
4141
bh.iter(|| std::hint::black_box(SVD::new(m.clone(), true, true)))
4242
});
@@ -50,21 +50,21 @@ fn rank_4x4(bh: &mut criterion::Criterion) {
5050
}
5151

5252
fn rank_10x10(bh: &mut criterion::Criterion) {
53-
let m = crate::reproductible_dmatrix(10, 10);
53+
let m = crate::reproducible_dmatrix(10, 10);
5454
bh.bench_function("rank_10x10", move |bh| {
5555
bh.iter(|| std::hint::black_box(m.rank(1.0e-10)))
5656
});
5757
}
5858

5959
fn rank_100x100(bh: &mut criterion::Criterion) {
60-
let m = crate::reproductible_dmatrix(100, 100);
60+
let m = crate::reproducible_dmatrix(100, 100);
6161
bh.bench_function("rank_100x100", move |bh| {
6262
bh.iter(|| std::hint::black_box(m.rank(1.0e-10)))
6363
});
6464
}
6565

6666
fn rank_200x200(bh: &mut criterion::Criterion) {
67-
let m = crate::reproductible_dmatrix(200, 200);
67+
let m = crate::reproducible_dmatrix(200, 200);
6868
bh.bench_function("rank_200x200", move |bh| {
6969
bh.iter(|| std::hint::black_box(m.rank(1.0e-10)))
7070
});
@@ -78,21 +78,21 @@ fn singular_values_4x4(bh: &mut criterion::Criterion) {
7878
}
7979

8080
fn singular_values_10x10(bh: &mut criterion::Criterion) {
81-
let m = crate::reproductible_dmatrix(10, 10);
81+
let m = crate::reproducible_dmatrix(10, 10);
8282
bh.bench_function("singular_values_10x10", move |bh| {
8383
bh.iter(|| std::hint::black_box(m.singular_values()))
8484
});
8585
}
8686

8787
fn singular_values_100x100(bh: &mut criterion::Criterion) {
88-
let m = crate::reproductible_dmatrix(100, 100);
88+
let m = crate::reproducible_dmatrix(100, 100);
8989
bh.bench_function("singular_values_100x100", move |bh| {
9090
bh.iter(|| std::hint::black_box(m.singular_values()))
9191
});
9292
}
9393

9494
fn singular_values_200x200(bh: &mut criterion::Criterion) {
95-
let m = crate::reproductible_dmatrix(200, 200);
95+
let m = crate::reproducible_dmatrix(200, 200);
9696
bh.bench_function("singular_values_200x200", move |bh| {
9797
bh.iter(|| std::hint::black_box(m.singular_values()))
9898
});
@@ -106,21 +106,21 @@ fn pseudo_inverse_4x4(bh: &mut criterion::Criterion) {
106106
}
107107

108108
fn pseudo_inverse_10x10(bh: &mut criterion::Criterion) {
109-
let m = crate::reproductible_dmatrix(10, 10);
109+
let m = crate::reproducible_dmatrix(10, 10);
110110
bh.bench_function("pseudo_inverse_10x10", move |bh| {
111111
bh.iter(|| std::hint::black_box(m.clone().pseudo_inverse(1.0e-10)))
112112
});
113113
}
114114

115115
fn pseudo_inverse_100x100(bh: &mut criterion::Criterion) {
116-
let m = crate::reproductible_dmatrix(100, 100);
116+
let m = crate::reproducible_dmatrix(100, 100);
117117
bh.bench_function("pseudo_inverse_100x100", move |bh| {
118118
bh.iter(|| std::hint::black_box(m.clone().pseudo_inverse(1.0e-10)))
119119
});
120120
}
121121

122122
fn pseudo_inverse_200x200(bh: &mut criterion::Criterion) {
123-
let m = crate::reproductible_dmatrix(200, 200);
123+
let m = crate::reproducible_dmatrix(200, 200);
124124
bh.bench_function("pseudo_inverse_200x200", move |bh| {
125125
bh.iter(|| std::hint::black_box(m.clone().pseudo_inverse(1.0e-10)))
126126
});

benches/linalg/symmetric_eigen.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -8,21 +8,21 @@ fn symmetric_eigen_decompose_4x4(bh: &mut criterion::Criterion) {
88
}
99

1010
fn symmetric_eigen_decompose_10x10(bh: &mut criterion::Criterion) {
11-
let m = crate::reproductible_dmatrix(10, 10);
11+
let m = crate::reproducible_dmatrix(10, 10);
1212
bh.bench_function("symmetric_eigen_decompose_10x10", move |bh| {
1313
bh.iter(|| std::hint::black_box(SymmetricEigen::new(m.clone())))
1414
});
1515
}
1616

1717
fn symmetric_eigen_decompose_100x100(bh: &mut criterion::Criterion) {
18-
let m = crate::reproductible_dmatrix(100, 100);
18+
let m = crate::reproducible_dmatrix(100, 100);
1919
bh.bench_function("symmetric_eigen_decompose_100x100", move |bh| {
2020
bh.iter(|| std::hint::black_box(SymmetricEigen::new(m.clone())))
2121
});
2222
}
2323

2424
fn symmetric_eigen_decompose_200x200(bh: &mut criterion::Criterion) {
25-
let m = crate::reproductible_dmatrix(200, 200);
25+
let m = crate::reproducible_dmatrix(200, 200);
2626
bh.bench_function("symmetric_eigen_decompose_200x200", move |bh| {
2727
bh.iter(|| std::hint::black_box(SymmetricEigen::new(m.clone())))
2828
});

nalgebra-sparse/tests/unit_tests/coo.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -298,7 +298,7 @@ fn coo_clear_triplets_valid_entries() {
298298
);
299299
coo.clear_triplets();
300300
assert_eq!(coo.triplet_iter().collect::<Vec<_>>(), vec![]);
301-
// making sure everyhting works after clearing
301+
// making sure everything works after clearing
302302
coo.push(0, 0, 1);
303303
coo.push(0, 0, 2);
304304
coo.push(2, 2, 3);

src/base/storage.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -220,7 +220,7 @@ pub unsafe trait RawStorageMut<T, R: Dim, C: Dim = U1>: RawStorage<T, R, C> {
220220
unsafe fn swap_unchecked_linear(&mut self, i1: usize, i2: usize) {
221221
// we can't just use the pointers returned from `get_address_unchecked_linear_mut` because calling a
222222
// method taking self mutably invalidates any existing (mutable) pointers. since `get_address_unchecked_linear_mut` can
223-
// also be overriden by a custom implementation, we can't just use `wrapping_add` assuming that's what the method does.
223+
// also be overridden by a custom implementation, we can't just use `wrapping_add` assuming that's what the method does.
224224
// instead, we use `offset_from` to compute the re-calculate the pointers from the base pointer.
225225
// this is sound as long as this trait matches the Validity preconditions
226226
// (and it's the caller's responsibility to ensure the indices are in-bounds).

src/geometry/rotation_specialization.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1124,7 +1124,7 @@ impl<T: SimdRealField> Rotation3<T> {
11241124
// lambda = 0, so ensure angle2 -> [0, pi]
11251125
angles[1] < T::zero() || angles[1] > T::pi()
11261126
} else {
1127-
// lamda = + or - pi/2, so ensure angle2 -> [-pi/2, pi/2]
1127+
// lambda = + or - pi/2, so ensure angle2 -> [-pi/2, pi/2]
11281128
angles[1] < -T::frac_pi_2() || angles[1] > T::frac_pi_2()
11291129
};
11301130

tests/geometry/quaternion.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ proptest!(
102102

103103
/*
104104
*
105-
* Quaterion * Vector == Rotation * Vector
105+
* Quaternion * Vector == Rotation * Vector
106106
*
107107
*/
108108
#[test]

0 commit comments

Comments
 (0)