Package flashcards

Class BucketSets


  • public class BucketSets
    extends Object
    Convert a map representation of learning buckets into a list-of-set representation.
    • Method Detail

      • toBucketSets

        public static List<Set<Flashcard>> toBucketSets​(Map<Flashcard,​Integer> bucketNumbers)
        Reorganize learning buckets from a map representation to a list-of-sets representation.
        Parameters:
        bucketNumbers - maps each flashcard to a nonnegative number
        Returns:
        a list of disjoint sets whose union is the set of cards in bucketNumbers, and where list.get(i) is the set of cards that bucketNumbers maps to i, for all i that are valid indexes of the list.