feat: compact strains (#32)
* store zero strains compactly * added docs * added proptest * add feature to store strains compactly * update ci * rename CompactZerosVec to StrainsVec * add size_hint for iter * rename iter * minor adjustments * more minor adjustments
This commit is contained in:
@@ -4,6 +4,7 @@ use crate::{
|
||||
skills::{strain_decay, ISkill, Skill, StrainDecaySkill},
|
||||
},
|
||||
catch::difficulty::object::CatchDifficultyObject,
|
||||
util::strains_vec::StrainsVec,
|
||||
};
|
||||
|
||||
const ABSOLUTE_PLAYER_POSITIONING_ERROR: f32 = 16.0;
|
||||
@@ -107,7 +108,7 @@ impl Movement {
|
||||
dist_addition / weighted_strain_time
|
||||
}
|
||||
|
||||
pub fn get_curr_strain_peaks(self) -> Vec<f64> {
|
||||
pub fn get_curr_strain_peaks(self) -> StrainsVec {
|
||||
self.inner.get_curr_strain_peaks()
|
||||
}
|
||||
|
||||
|
||||
@@ -20,6 +20,6 @@ pub fn strains(difficulty: &Difficulty, converted: &CatchBeatmap<'_>) -> CatchSt
|
||||
let DifficultyValues { movement, .. } = DifficultyValues::calculate(difficulty, converted);
|
||||
|
||||
CatchStrains {
|
||||
movement: movement.get_curr_strain_peaks(),
|
||||
movement: movement.get_curr_strain_peaks().into_vec(),
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user