pub struct HardSoftScore { /* private fields */ }Implementations§
Source§impl HardSoftScore
impl HardSoftScore
Sourcepub const ZERO: HardSoftScore
pub const ZERO: HardSoftScore
The zero score.
Sourcepub const ONE_HARD: HardSoftScore
pub const ONE_HARD: HardSoftScore
One hard constraint penalty.
Sourcepub const ONE_SOFT: HardSoftScore
pub const ONE_SOFT: HardSoftScore
One soft constraint penalty.
pub const fn of(hard: i64, soft: i64) -> Self
pub const fn of_hard(hard: i64) -> Self
pub const fn of_soft(soft: i64) -> Self
pub const fn hard(&self) -> i64
pub const fn soft(&self) -> i64
pub const fn hard_score(&self) -> HardSoftScore
pub const fn soft_score(&self) -> HardSoftScore
Trait Implementations§
Source§impl Add for HardSoftScore
impl Add for HardSoftScore
Source§impl Clone for HardSoftScore
impl Clone for HardSoftScore
Source§fn clone(&self) -> HardSoftScore
fn clone(&self) -> HardSoftScore
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 Debug for HardSoftScore
impl Debug for HardSoftScore
Source§impl Default for HardSoftScore
impl Default for HardSoftScore
Source§fn default() -> HardSoftScore
fn default() -> HardSoftScore
Returns the “default value” for a type. Read more
Source§impl Display for HardSoftScore
impl Display for HardSoftScore
Source§impl Hash for HardSoftScore
impl Hash for HardSoftScore
Source§impl Neg for HardSoftScore
impl Neg for HardSoftScore
Source§impl Ord for HardSoftScore
impl Ord for HardSoftScore
Source§impl ParseableScore for HardSoftScore
impl ParseableScore for HardSoftScore
fn parse(s: &str) -> Result<Self, ScoreParseError>
fn to_string_repr(&self) -> String
Source§impl PartialEq for HardSoftScore
impl PartialEq for HardSoftScore
Source§impl PartialOrd for HardSoftScore
impl PartialOrd for HardSoftScore
Source§impl Score for HardSoftScore
impl Score for HardSoftScore
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
Source§impl Sub for HardSoftScore
impl Sub for HardSoftScore
impl Copy for HardSoftScore
impl Eq for HardSoftScore
impl StructuralPartialEq for HardSoftScore
Auto Trait Implementations§
impl Freeze for HardSoftScore
impl RefUnwindSafe for HardSoftScore
impl Send for HardSoftScore
impl Sync for HardSoftScore
impl Unpin for HardSoftScore
impl UnsafeUnpin for HardSoftScore
impl UnwindSafe for HardSoftScore
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