Skip to content

Commit

Permalink
Additional ArraySubset iterators docs
Browse files Browse the repository at this point in the history
  • Loading branch information
LDeakin committed Feb 12, 2024
1 parent ca01e66 commit 5631f30
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 1 deletion.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- **Major breaking**: refactor array subset iterators:
- `ArraySubset::iter_` methods no longer have an `iter_` prefix and return structures implementing `IntoIterator` including
- `Indices`, `LinearisedIndices`, `ContiguousIndices`, `ContiguousLinearisedIndices`, `Chunks`
- `Indices` and `Chunks` implement `IntoParIter`
- `Indices` and `Chunks` implement `IntoParallelIter`
- **Breaking**: array subset iterators are moved into public `array_subset::iterators` and no longer in the `array_subset` namespace

### Removed
Expand Down
17 changes: 17 additions & 0 deletions src/array_subset/iterators.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,21 @@
//! Array subset iterators.
//!
//! The iterators are:
//! - [`Indices`]: iterate over the multidimensional indices of the elements in the subset.
//! - [`LinearisedIndices`]: iterate over linearised indices of the elements in the subset.
//! - [`ContiguousIndices`]: iterate over contiguous sets of elements in the subset with the start a multidimensional index.
//! - [`ContiguousLinearisedIndices`]: iterate over contiguous sets of elements in the subset with the start a linearised index.
//! - [`Chunks`]: iterate over regular sized chunks in the array subset.
//!
//! These can be created with the appropriate [`ArraySubset`](super::ArraySubset) methods including
//! [`indices`](super::ArraySubset::indices),
//! [`linearised_indices`](super::ArraySubset::linearised_indices),
//! [`contiguous_indices`](super::ArraySubset::contiguous_indices),
//! [`contiguous_linearised_indices`](super::ArraySubset::contiguous_linearised_indices), and
//! [`chunks`](super::ArraySubset::chunks).
//!
//! All iterators support [`into_iter()`](IntoIterator::into_iter) ([`IntoIterator`]).
//! The [`Indices`] and [`Chunks`] iterators also support [`rayon`]'s [`into_par_iter()`](rayon::iter::IntoParallelIterator::into_par_iter) ([`IntoParallelIterator`](rayon::iter::IntoParallelIterator)).
mod chunks_iterator;
mod contiguous_indices_iterator;
Expand Down

0 comments on commit 5631f30

Please sign in to comment.