mirror of
https://github.com/ankitects/anki.git
synced 2026-01-13 22:13:58 -05:00
bump fsrs-rs
This commit is contained in:
parent
c0cd197cac
commit
4b70930d46
3 changed files with 10 additions and 5 deletions
2
Cargo.lock
generated
2
Cargo.lock
generated
|
|
@ -2295,7 +2295,7 @@ dependencies = [
|
|||
[[package]]
|
||||
name = "fsrs"
|
||||
version = "4.0.0"
|
||||
source = "git+https://github.com/Luc-Mcgrady/fsrs-optimizer-burn.git?rev=fe6af1d33a2edb33dd8a50d87742e60e6a51de01#fe6af1d33a2edb33dd8a50d87742e60e6a51de01"
|
||||
source = "git+https://github.com/open-spaced-repetition/fsrs-rs.git?rev=0aa238a7e0daa26ffc66596e508a818d504bb5df#0aa238a7e0daa26ffc66596e508a818d504bb5df"
|
||||
dependencies = [
|
||||
"burn",
|
||||
"itertools 0.14.0",
|
||||
|
|
|
|||
|
|
@ -36,8 +36,8 @@ rev = "184b2ca50ed39ca43da13f0b830a463861adb9ca"
|
|||
|
||||
[workspace.dependencies.fsrs]
|
||||
# version = "3.0.0"
|
||||
git = "https://github.com/Luc-Mcgrady/fsrs-optimizer-burn.git"
|
||||
rev = "fe6af1d33a2edb33dd8a50d87742e60e6a51de01"
|
||||
git = "https://github.com/open-spaced-repetition/fsrs-rs.git"
|
||||
rev = "0aa238a7e0daa26ffc66596e508a818d504bb5df"
|
||||
# path = "../open-spaced-repetition/fsrs-rs"
|
||||
|
||||
[workspace.dependencies]
|
||||
|
|
|
|||
|
|
@ -103,8 +103,13 @@ impl crate::services::DeckConfigService for Collection {
|
|||
) -> Result<anki_proto::deck_config::GetRetentionWorkloadResponse> {
|
||||
const LEARN_SPAN: usize = 1000;
|
||||
|
||||
let before = fsrs::expected_workload(&input.w, input.before, LEARN_SPAN)?;
|
||||
let after = fsrs::expected_workload(&input.w, input.after, LEARN_SPAN)?;
|
||||
const PASS_COST: f32 = 7.;
|
||||
const FAIL_COST: f32 = 23.;
|
||||
|
||||
let before =
|
||||
fsrs::expected_workload(&input.w, input.before, LEARN_SPAN, PASS_COST, FAIL_COST)?;
|
||||
let after =
|
||||
fsrs::expected_workload(&input.w, input.after, LEARN_SPAN, PASS_COST, FAIL_COST)?;
|
||||
|
||||
Ok(anki_proto::deck_config::GetRetentionWorkloadResponse {
|
||||
factor: after / before,
|
||||
|
|
|
|||
Loading…
Reference in a new issue