pub fn current_card_new_intervals(&self) -> [chrono::Duration; cards::SCORES] {
        // Get current card.
        let card = self.current_card();
        // TODO: This code is effectively the same as the calculation of average in `review`.
        //       Perhaps move it to a distinct method of some kind.
        // The sum of the familiarities. Start with the global familiarity.
        let mut familiarity_sum = self.sched.statistics.familiarity;
        // The number of tags with familiarity statistics.
        let mut familiarity_num = 1;
        // Calculate the sum, in order to obtain average.
        for tag in &card.tags {
            if let Some(stat) = self.sched.tag_statistics.get(tag) {
                familiarity_sum += stat.familiarity;
                familiarity_num += 1;
            }
        }

        // Calculate the new intervals.
        self.current_metacard()
            .new_intervals(
                self.deck.tag_settings(&card.tags), card.priority,
                familiarity_sum / familiarity_num as f32,
                card.max_interval,
            )
    }
/// Get the possible new intervals after review, ordered after score.
///
/// These possible intervals are supposed to be shown to the user after they have reviewed all
/// sides of the card, before they provide the score for the review.
Get the possible new intervals after review, ordered after score.
These possible intervals are supposed to be shown to the user after they have reviewed all
sides of the card, before they provide the score for the review.
Get the possible new intervals after review ordered after score . These possible intervals are supposed to be shown to the user after they have reviewed all sides of the card before they provide the score for the review .
pub fn current_card_new_intervals(&self) -> [chrono::Duration; cards::SCORES] {
        // Get current card.
        let card = self.current_card();
        // TODO: This code is effectively the same as the calculation of average in `review`.
        //       Perhaps move it to a distinct method of some kind.
        // The sum of the familiarities. Start with the global familiarity.
        let mut familiarity_sum = self.sched.statistics.familiarity;
        // The number of tags with familiarity statistics.
        let mut familiarity_num = 1;
        // Calculate the sum, in order to obtain average.
        for tag in &card.tags {
            if let Some(stat) = self.sched.tag_statistics.get(tag) {
                familiarity_sum += stat.familiarity;
                familiarity_num += 1;
            }
        }
        // Calculate the new intervals.
        self.current_metacard()
            .new_intervals(
                self.deck.tag_settings(&card.tags), card.priority,
                familiarity_sum / familiarity_num as f32,
                card.max_interval,
            )
    }
pub fn current_card_new_intervals ( & self ) -> [ chrono :: Duration ; cards :: SCORES ] { // Get current card. let card = self . current_card ( ) ; // TODO: This code is effectively the same as the calculation of average in `review`. //       Perhaps move it to a distinct method of some kind. // The sum of the familiarities. Start with the global familiarity. let mut familiarity_sum = self . sched . statistics . familiarity ; // The number of tags with familiarity statistics. let mut familiarity_num = 1 ; // Calculate the sum, in order to obtain average. for tag in & card . tags { if let Some ( stat ) = self . sched . tag_statistics . get ( tag ) { familiarity_sum += stat . familiarity ; familiarity_num += 1 ; } } // Calculate the new intervals. self . current_metacard ( ) . new_intervals ( self . deck . tag_settings ( & card . tags ) , card . priority , familiarity_sum / familiarity_num as f32 , card . max_interval , ) }
Get the possible new intervals after review, ordered after score.
Get the possible new intervals after review ordered after score .
&self
&self