Package flashcards

Class Update


  • public class Update
    extends Object
    Update a card's bucket number after a practice trial.
    • Method Detail

      • update

        public static void update​(Flashcard card,
                                  Answer answer,
                                  Map<Flashcard,​Integer> bucketMap,
                                  int retiredBucket)
        Update step for the Modified-Leitner algorithm.
        Parameters:
        card - a flashcard the user just saw
        answer - the user's answer to the flashcard
        bucketMap - represents learning buckets before the flashcard was seen. Maps each flashcard to a bucket number in the range [0...retiredBucket] inclusive. Mutated by this method to put `card` in the appropriate bucket as determined by the Modified-Leitner algorithm.
        retiredBucket - number of retired bucket. Must be >= 0.