Skip to content

Commit

Permalink
chunk: shape -> chunk_shape
Browse files Browse the repository at this point in the history
  • Loading branch information
gauteh committed May 27, 2023
1 parent 7ebde25 commit 3a2b35f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/idx/chunk.rs
Original file line number Diff line number Diff line change
Expand Up @@ -50,14 +50,14 @@ impl<const D: usize> Chunk<D> {
/// Is the point described by the indices inside the chunk (`Equal`), before (`Less`) or after
/// (`Greater`).
#[must_use]
pub fn contains(&self, i: &[u64], shape: &[u64]) -> Ordering {
assert!(i.len() == shape.len());
pub fn contains(&self, i: &[u64], chunk_shape: &[u64]) -> Ordering {
assert!(i.len() == chunk_shape.len());
assert!(i.len() == self.offset.len());

for j in 0..i.len() {
if i[j] < self.offset[j].get() {
return Ordering::Less;
} else if i[j] >= self.offset[j].get() + shape[j] {
} else if i[j] >= self.offset[j].get() + chunk_shape[j] {
return Ordering::Greater;
}
}
Expand Down

0 comments on commit 3a2b35f

Please sign in to comment.