#partition #iterator #math #enumerate #content #adaptor #k-partitions

partition-iterator

Iterator adaptors that enumerate all partitions or all k-partitions of an iterator's content

1 unstable release

0.1.0 Mar 8, 2022

#7 in #enumerate

MIT license

13KB
291 lines

Partition iterators

Iterator adaptors that enumerate all partitions or all k-partitions of an iterator's content. The iterator is based on a Python implementation which generate Ruskey Gray codes for so-called "restricted growth sequences" (which biject onto set partitions). As a result, the memory footprint is very low.

How to use with Cargo:

[dependencies]
partition-iterator = "0.1.0"

How to use in your crate:

use partition_iterator::PartitionIter;

License

Licensed under MIT license https://opensource.org/licenses/MIT.

No runtime deps