-
-
Notifications
You must be signed in to change notification settings - Fork 20
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feat/flat power forgetting curve #134
Conversation
linux:
win:
floating point again :( |
I can't see an easy way to combine the three power_forgetting_curves, as you have one that uses raw floats, one that uses NdArray, and one that uses tensors. You could potentially just have a raw float one and then convert the tensors to floats and back again, but it might be a bit slower if it's called frequently. |
They have different types, not something like instead, Maybe first we need to unify the array type... |
Some small thought, maybe (I am not sure how to write the trait, this is a draft.) fn power_forgetting_curve<T1, T2>(a: T1, b: T2) -> T1
where
T1: Add<Rhs = xxx, Ouput = T1> + Mul<Rhs = xxx, Output = T1> + Pow<Rhs = xxx, Output = T1>,
T2: Add<Rhs = xxx, Ouput = T2> + Mul<Rhs = xxx, Output = T2> + Pow<Rhs = xxx, Output = T2>,
{
a.some_operator(b)
} |
Idea: open-spaced-repetition/fsrs4anki#461 (comment)
Python Implementation: open-spaced-repetition/fsrs-optimizer@8ac5d5b
Help wanted: There are duplicated function named
power_forgetting_curve
. Is it possible to refactor them into one function?