trotter
3.0.0, released 6 days ago by an unverified publisher
Classes for combinatorics pseudo-lists like permutations, combinations, and subsets.
WASM-ready
What it does
Provides memory-efficient pseudo-list classes for combinatorial structures such as permutations, combinations, compositions, amalgams, subsets, and compounds. It maps indices to selections without generating or storing all items in memory at once.
AI-written summary of version 3.0.0, based on the package's README and metadata. Report an inaccuracy
Use it when
- You need to work with combinations, permutations, or subsets in Dart
- You are dealing with embarrassingly parallel workloads or steganography requiring indexed access to combinations
Skip it when
- You need a general-purpose collection library without combinatorial math requirements
Strengths
- Memory efficient through index mapping instead of full list generation
- Supports BigInt indices for very large combinations
- Includes support for replacement and unspecified length variants
Weaknesses
- Niche domain-specific utility limited to combinatorics
Setup
- Kind
- Pure Dart
- Effort
- Low
- Code generation
- No
- Direct dependencies
- 0
final combinations = Combinations(
items: {'a', 'b', 'c', 'd', 'e'},
take: 3,
);
for (final (i, combination) in combinations().indexed) {
print('[$i]: $combination');
}Alternatives
Packages that do the same job and could replace trotter.
- markdown_description_list
Adds support for Markdown description/definition lists to the markdown package
63Compare