Crate misc_iterators

Source
Expand description

§Misc Iterators

A collection of uncommon but useful iterators. It includes:

  • A Dicrete Differential Analyzer iterator.
  • A BFS iterator.
  • A DFS iterator.

Modules§

breadth_first_search
Breath first search iterator.
depth_first_search
Depth first search iterator.
integer_decomposition
Itertor for integer tuples that add to less than a number.
raster_line
DDA iterator.

Structs§

Interval
Start value, termination, update step.
IterDimensions
Iterator that can properly iterate a multidiemnsional array of given sizes. For example a 3D array with dimensions (100, 30, 900). Last dimension is updated least frequently, first is updated most frequently.
MultiIndex
Iterator that can index a rectangular subblock of a multidimensional domain. For example, if one wants to iterate over the range: (1 -> 100) x (100 -> -10) x (90 -> 20) Prefer IterDimensions when possible. WARNING: This checks for exact matches against the bounds. If they are not correct, it will iterate forever.
SmartInterval
Oriented interval representation.

Functions§

permute
Apply a permutation to a list. The permutation list is assumed to be ordered as (source, target) so for example: