mirror of
https://github.com/ankitects/anki.git
synced 2026-01-14 06:23:57 -05:00
bump ts-fsrs
This commit is contained in:
parent
627214512b
commit
a49d85279b
3 changed files with 22 additions and 6 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/open-spaced-repetition/fsrs-rs.git?rev=0aa238a7e0daa26ffc66596e508a818d504bb5df#0aa238a7e0daa26ffc66596e508a818d504bb5df"
|
||||
source = "git+https://github.com/open-spaced-repetition/fsrs-rs.git?rev=53784503103169ca6c0702ae2a6d5c84c3d42269#53784503103169ca6c0702ae2a6d5c84c3d42269"
|
||||
dependencies = [
|
||||
"burn",
|
||||
"itertools 0.14.0",
|
||||
|
|
|
|||
|
|
@ -37,7 +37,7 @@ rev = "184b2ca50ed39ca43da13f0b830a463861adb9ca"
|
|||
[workspace.dependencies.fsrs]
|
||||
# version = "3.0.0"
|
||||
git = "https://github.com/open-spaced-repetition/fsrs-rs.git"
|
||||
rev = "0aa238a7e0daa26ffc66596e508a818d504bb5df"
|
||||
rev = "53784503103169ca6c0702ae2a6d5c84c3d42269"
|
||||
# path = "../open-spaced-repetition/fsrs-rs"
|
||||
|
||||
[workspace.dependencies]
|
||||
|
|
|
|||
|
|
@ -105,11 +105,27 @@ impl crate::services::DeckConfigService for Collection {
|
|||
|
||||
const PASS_COST: f32 = 7.;
|
||||
const FAIL_COST: f32 = 23.;
|
||||
const COST_LEARN: f32 = 30.0;
|
||||
const INITIAL_PASS_RATE: f32 = 0.8;
|
||||
|
||||
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)?;
|
||||
let before = fsrs::expected_workload(
|
||||
&input.w,
|
||||
input.before,
|
||||
LEARN_SPAN,
|
||||
PASS_COST,
|
||||
FAIL_COST,
|
||||
COST_LEARN,
|
||||
INITIAL_PASS_RATE,
|
||||
)?;
|
||||
let after = fsrs::expected_workload(
|
||||
&input.w,
|
||||
input.after,
|
||||
LEARN_SPAN,
|
||||
PASS_COST,
|
||||
FAIL_COST,
|
||||
COST_LEARN,
|
||||
INITIAL_PASS_RATE,
|
||||
)?;
|
||||
|
||||
Ok(anki_proto::deck_config::GetRetentionWorkloadResponse {
|
||||
factor: after / before,
|
||||
|
|
|
|||
Loading…
Reference in a new issue