From 7c1165820a9d5f3dd0bc58f25c1ead257c5c2e6e Mon Sep 17 00:00:00 2001 From: shenjack <3695888@qq.com> Date: Sat, 30 Mar 2024 20:40:37 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B0=94=E6=AD=BB=E6=AC=A7=E5=98=9E=EF=BC=81?= =?UTF-8?q?=EF=BC=81=EF=BC=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/evaluate/xuping/eval.rs | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/src/evaluate/xuping/eval.rs b/src/evaluate/xuping/eval.rs index ab88ba7..6c4ee1a 100644 --- a/src/evaluate/xuping/eval.rs +++ b/src/evaluate/xuping/eval.rs @@ -72,7 +72,7 @@ pub fn predict_13(name: &Namer) -> f64 { { let mut st: [f64; 43] = [0.0; 43]; // 长度取 64, 方便simd填充 - for i in 0..7 { + for i in 0..=7 { st[i] = name.name_prop[i] as f64; } for i in 0..16 { @@ -81,9 +81,6 @@ pub fn predict_13(name: &Namer) -> f64 { } } // - st: 名字属性。0~7 是八围,8~42 是技能熟练度。 - // for i in 0..34 { - // st[i + 8] = name.skl_freq[i] as f64; - // } let mut cnt = 0; for i in 0..43 { @@ -143,8 +140,8 @@ mod test { namer.update_skill(); - println!("{:?}", predict_13(&namer)); println!("{:?}", namer.get_info()); - panic!(); + assert_eq!(predict_13(&namer), 5799.586821819173); + } }