PackageTrack
Sign in Get early access

trotter

Class definitions for pseudo-lists that simplify working with structures commonly encountered in combinatorics such as permutations, combinations and subsets.

2.2.2 6.8K downloads/mo #3450 most downloaded on pub.dev ram6ler/dart-trotter

What this package is like to depend on

Last release 1 years ago

20 Jul 2025

Ships fairly regularly

a new release about every 11 months

Nearly every release is documented

notes for 19 of 21 stable releases

Nothing withdrawn

no release was ever pulled

12 years old

22 releases · first in 2014

0 releases in the last 12 months

see the full history below

Release timeline

22 releases · Sep 2014 to Jul 2025
2015 2017 2019 2021 2023 2025
Release Pre-release

Releases

latest 22
  1. 2.2.2 20 Jul 2025
    Release notes
    • Some typing clarification.
    • Removed README generator in favor of using popmark.
    Open source →
  2. 2.2.1 20 Jul 2025
    Release notes
    • Housekeeping.
    • Some mistakes in the readme fixed.
    • Updated fun-with-trotter-sprites example to work with web.
    Open source →
  3. 2.2.0 09 Sep 2023
    Release notes
    • Restructured the library to better fit the dart.dev guidelines.
    Open source →
  4. 2.1.0 27 May 2023
    Release notes
    • Update for Dart 3.
    Open source →
  5. 2.0.0 09 Sep 2022

    Nothing published for this version

  6. 2.0.0-dev.1 26 Feb 2021 pre-release
    Release notes
    • Null-safety migration.
    Open source →
  7. 1.2.0 23 Apr 2020
    Release notes
    • Added a Storage class to wrap other classes; this allows us to add, remove and keep track of arrangements in a memory efficient (one bit per arrangement) way. Can only be used for moderately sized structures.
    • Updated the fun-with-mastermind example to make use of the storage class.
    Open source →
  8. 1.1.2 16 Apr 2020
    Release notes
    • Fixed some minor mistakes in the code.
    • Added fun-with-trotter-sprites example.
    Open source →
  9. 1.1.1 17 Dec 2019
    Release notes
    • Followed some of the pub.dev health suggestions.
    • Added link to Permutation Products demo.
    • Corrected environment requirements (Dart 2.7.0 to support extensions).
    Open source →
  10. 1.1.0 13 Dec 2019
    Release notes
    • Added extensions to Lists and Strings. (Nice Dart 2.7.0 feature!)
    • Provided functionality for random sampling from the pseudo-lists.
    Open source →
  11. 1.0.2 10 Aug 2018
    Release notes
    • Cleaned up the type declaration for the iterables.
    • Link to Falco-shapes demo.
    Open source →
  12. 1.0.1 08 Aug 2018
    Release notes

    Made the abstract, parent class Combinatorics visible to the user for those cases in which the combinatorics type is not known at the time of declaration.

    Open source →
  13. 1.0.0 03 Aug 2018
    Release notes
    • Cleaned up code to be more in line with Dart 2.
    • Added example.dart (and an example output, fun-with-mastermind.md) to example/.
    Open source →
  14. 0.9.5 07 May 2018
    Release notes
    • As of Dart 2, int instances represent 64 bit, as opposed to arbitrary length, integers. Since trotter often works with very large integers, it needed an overhaul so as to incorporate the BigInt class. This resulted in several breaking changes, most notably that the base _Combinatoric class no longer extends ListBase. I have made the class instances callable, however, to address this: code that needs an instance of one of the classes to behave like an iterable just need to call the instance. For example, if perms is an instance of Permutations, we would now use something like for (var p in perms()) (as opposed to for (var p in perms), which worked in previous versions). The instances can still be thought of as pseudo-lists in that they can be indexed and have several properties and methods that might be expected in a list, such as length and indexOf.

    • I took advantage of the necessity of making breaking changes mentioned above to make one more: I have renamed the Selections class Compositions. In combinatorics literature, the term selection is often use as a generic word to mean either combination or permutation. This might have caused confusion in the way I had used the term in previous versions of the library. I think that composition is more appropriate to mean a selection in which order is not important (if a body is composed of materials A, B and C then it is also composed of materials C, B and A) and items are "replaced" (it makes sense to say that a body is composed of two parts A to one part B, for example).

    Open source →
  15. 0.9.1 10 Dec 2017
    Release notes
    • Fixed an error introduced during the changes made for 0.9.0.
    Open source →
  16. 0.9.0 07 Dec 2017
    Release notes
    • Cleaned up and simplified the code so that the structures extend Lists more naturally. (Structures extend ListBase now instead of Iterable.)
    • Should be backwards compatible in that code that works in previous versions should also work in this version.
    • Structures should now behave better with List methods like map, where, every and so on.
    Open source →
  17. 0.8.5 13 Jan 2017
    Release notes
    • Cleaned up the code so that the library may be used in strong mode.
    • Added subset of the functionality associated with Iterables (first, last, any, every, forEach etc.). Some functionality that would be redundant (e.g. isEmpty) or less meaningful/useful (e.g. fold) neglected. Since structures we can represent can "contain" a huge number of arrangements, we need to be careful about using methods that iterate over the structures (like any, every, forEach).
    Open source →
  18. 0.8.1 10 Feb 2016
    Release notes
    • Added the Compounds class (permutations of unspecified size).
    • Added the contains method for all classes.
    • Corrected indexOf behavior for when arrangements that don't exist are passed as arguments; returns -1 if the arrangement is not in the pseudo-list.
    Open source →
  19. 0.8.0 08 Feb 2016
    Release notes
    • Added inverses to all the functions so that we can look up arrangements non iteratively (now possible to look up values in arbitrarily large pseudo-lists; this library was incomplete without this functionality!).
    • Made the code more readable. Made a few minor tweaks to the existing code.
    Open source →
  20. 0.5.2 26 Nov 2014

    Nothing published for this version

  21. 0.5.1 27 Sep 2014
    Release notes

    Improved the documentation; minor bug fixes.

    Open source →
  22. 0.5.0 27 Sep 2014
    Release notes

    First Dart release: support for classes:

    • Permutations
    • Combinations
    • Amalgams (permutations with replacement during arranging)
    • Selections (combinations with replacement during arranging)
    • Subsets
    Open source →

Every package, every release, already written down.

The archive is open and free. Watching your own project is what we are building next.

Browse the archive