Closed sineptic closed 4 weeks ago
How I can in one time have information about card review history and modify memory_state by passing value from memory_state_from_sm2?
What calculating
memory_state
do? I have this question because it accepts starting state. I need to store previous calculations or if not when I want to pass it?
The function is used to calculate the latest memory state of a given card from its review history. If the history is incomplete (e.g., the first review is lost), the starting state is required.
How I can in one time have information about card review history and modify memory_state by passing value from memory_state_from_sm2?
You don't need to use memory_state_from_sm2
if you have complete review history. To get card review history in one time, you need to store review history in your database and query them by card_id
.
So is it true, that I can think about this funcion as 2 different(one for migrating, one for main use)?
There are four cases:
memory_state
.memory_state_from_sm2
memory_state_from_sm2
in the earliest log to get the starting_state
and then use memory_state
.next_states
.I added three examples:
https://github.com/open-spaced-repetition/fsrs-rs/blob/main/examples/migrate.rs
They may help you understand how memory_state
works.
Thank you so much!
What calculating
memory_state
do? I have this question because it accepts starting state. I need to store previous calculations or if not when I want to pass it?