Skip to content

Add index-only variants of combinations (and permutations) #3

@olivercalder

Description

@olivercalder

Avoid taking ownership of an IntoIterator and cloning elements on output. Provide a way to create permutations over borrowed references from an iterator (perhaps remove way to do this with owned elements), and definitely add new combinations and permutations variants which just return indices into an ordered set, rather than items from an actual collection.

This would also remove the need for unconditionally calling iterable_to_sorted_set in combinations.rs. Perhaps this could be exported to users, if they want to deduplicate and sort collections before taking combinations or permutations.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions