Java generic Iterator implementation to generate permutations and combinations.
Uses the algorithm described here http://en.wikipedia.org/wiki/Steinhaus%E2%80%93Johnson%E2%80%93Trotter_algorithm#Even.27s_speedup and the clear description of that algorithm here: http://www.cut-the-knot.org/Curriculum/Combinatorics/JohnsonTrotter.shtml
Features
- Iterator going through all permutations of elements in a Collection
- Iterator going through all pair wise swaps required to generate all permutations
- Iterator generating all combinations of elements in a Collection
- All strongly typed by using generic type (Iterator<T>)
License
BSD LicenseFollow SwapPermutationsIterator
Other Useful Business Software
MongoDB Atlas runs apps anywhere
MongoDB Atlas gives you the freedom to build and run modern applications anywhere—across AWS, Azure, and Google Cloud. With global availability in over 115 regions, Atlas lets you deploy close to your users, meet compliance needs, and scale with confidence across any geography.
Rate This Project
Login To Rate This Project
User Reviews
Be the first to post a review of SwapPermutationsIterator!