pub struct BendableScore<const H: usize, const S: usize> { /* private fields */ }Implementations§
Source§impl<const H: usize, const S: usize> BendableScore<H, S>
impl<const H: usize, const S: usize> BendableScore<H, S>
pub const fn of(hard: [i64; H], soft: [i64; S]) -> Self
pub const fn zero() -> Self
pub const fn hard_levels_count(&self) -> usize
pub const fn soft_levels_count(&self) -> usize
Sourcepub const fn hard_score(&self, level: usize) -> i64
pub const fn hard_score(&self, level: usize) -> i64
Sourcepub const fn soft_score(&self, level: usize) -> i64
pub const fn soft_score(&self, level: usize) -> i64
pub const fn hard_scores(&self) -> &[i64; H]
pub const fn soft_scores(&self) -> &[i64; S]
pub const fn one_hard(level: usize) -> Self
pub const fn one_soft(level: usize) -> Self
Trait Implementations§
Source§impl<const H: usize, const S: usize> Clone for BendableScore<H, S>
impl<const H: usize, const S: usize> Clone for BendableScore<H, S>
Source§fn clone(&self) -> BendableScore<H, S>
fn clone(&self) -> BendableScore<H, S>
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl<const H: usize, const S: usize> Ord for BendableScore<H, S>
impl<const H: usize, const S: usize> Ord for BendableScore<H, S>
Source§impl<const H: usize, const S: usize> PartialOrd for BendableScore<H, S>
impl<const H: usize, const S: usize> PartialOrd for BendableScore<H, S>
Source§impl<const H: usize, const S: usize> Score for BendableScore<H, S>
impl<const H: usize, const S: usize> Score for BendableScore<H, S>
fn is_feasible(&self) -> bool
fn zero() -> Self
fn levels_count() -> usize
fn to_level_numbers(&self) -> Vec<i64>
fn from_level_numbers(levels: &[i64]) -> Self
fn multiply(&self, multiplicand: f64) -> Self
fn divide(&self, divisor: f64) -> Self
fn abs(&self) -> Self
fn level_label(index: usize) -> ScoreLevel
fn to_scalar(&self) -> f64
fn compare(&self, other: &Self) -> Ordering
fn is_better_than(&self, other: &Self) -> bool
fn is_worse_than(&self, other: &Self) -> bool
fn is_equal_to(&self, other: &Self) -> bool
fn one_hard() -> Self
fn one_soft() -> Self
fn one_medium() -> Self
impl<const H: usize, const S: usize> Copy for BendableScore<H, S>
impl<const H: usize, const S: usize> Eq for BendableScore<H, S>
impl<const H: usize, const S: usize> StructuralPartialEq for BendableScore<H, S>
Auto Trait Implementations§
impl<const H: usize, const S: usize> Freeze for BendableScore<H, S>
impl<const H: usize, const S: usize> RefUnwindSafe for BendableScore<H, S>
impl<const H: usize, const S: usize> Send for BendableScore<H, S>
impl<const H: usize, const S: usize> Sync for BendableScore<H, S>
impl<const H: usize, const S: usize> Unpin for BendableScore<H, S>
impl<const H: usize, const S: usize> UnsafeUnpin for BendableScore<H, S>
impl<const H: usize, const S: usize> UnwindSafe for BendableScore<H, S>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more