Skip to content

Commit 67b5f23

Browse files
committed
histogram/grid.rs: Fix terminology
`left inclusive` and `right exclusive` are not standard math terminology. It should be phrased as `left-closed` and `right-open`.
1 parent 570e291 commit 67b5f23

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/histogram/grid.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ use std::ops::Range;
8080
/// let histogram = observations.histogram(grid);
8181
///
8282
/// let histogram_matrix = histogram.counts();
83-
/// // Bins are left inclusive, right exclusive!
83+
/// // Bins are left-closed, right-open!
8484
/// let expected = array![4, 3, 3, 1, 0, 1];
8585
/// assert_eq!(histogram_matrix, expected.into_dyn());
8686
/// ```
@@ -179,7 +179,7 @@ impl<A: Ord> Grid<A> {
179179
/// square_grid.index_of(&array![n64(0.), n64(-0.7)]),
180180
/// Some(vec![1, 0]),
181181
/// );
182-
/// // Returns `None`, as `1.` is outside the grid since bins are right exclusive
182+
/// // Returns `None`, as `1.` is outside the grid since bins are right-open
183183
/// assert_eq!(
184184
/// square_grid.index_of(&array![n64(0.), n64(1.)]),
185185
/// None,

0 commit comments

Comments
 (0)