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