pub struct HardMediumSoftScore { /* private fields */ }Implementations§
Source§impl HardMediumSoftScore
impl HardMediumSoftScore
Sourcepub const ZERO: HardMediumSoftScore
pub const ZERO: HardMediumSoftScore
The zero score.
Sourcepub const ONE_HARD: HardMediumSoftScore
pub const ONE_HARD: HardMediumSoftScore
One hard constraint penalty.
Sourcepub const ONE_MEDIUM: HardMediumSoftScore
pub const ONE_MEDIUM: HardMediumSoftScore
One medium constraint penalty.
Sourcepub const ONE_SOFT: HardMediumSoftScore
pub const ONE_SOFT: HardMediumSoftScore
One soft constraint penalty.
pub const fn of(hard: i64, medium: i64, soft: i64) -> HardMediumSoftScore
pub const fn of_hard(hard: i64) -> HardMediumSoftScore
pub const fn of_medium(medium: i64) -> HardMediumSoftScore
pub const fn of_soft(soft: i64) -> HardMediumSoftScore
pub const fn hard(&self) -> i64
pub const fn medium(&self) -> i64
pub const fn soft(&self) -> i64
Trait Implementations§
Source§impl Add for HardMediumSoftScore
impl Add for HardMediumSoftScore
Source§type Output = HardMediumSoftScore
type Output = HardMediumSoftScore
The resulting type after applying the
+ operator.Source§fn add(self, other: HardMediumSoftScore) -> HardMediumSoftScore
fn add(self, other: HardMediumSoftScore) -> HardMediumSoftScore
Performs the
+ operation. Read moreSource§impl Clone for HardMediumSoftScore
impl Clone for HardMediumSoftScore
Source§fn clone(&self) -> HardMediumSoftScore
fn clone(&self) -> HardMediumSoftScore
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 HardMediumSoftScore
impl Debug for HardMediumSoftScore
Source§impl Default for HardMediumSoftScore
impl Default for HardMediumSoftScore
Source§fn default() -> HardMediumSoftScore
fn default() -> HardMediumSoftScore
Returns the “default value” for a type. Read more
Source§impl Display for HardMediumSoftScore
impl Display for HardMediumSoftScore
Source§impl Hash for HardMediumSoftScore
impl Hash for HardMediumSoftScore
Source§impl Neg for HardMediumSoftScore
impl Neg for HardMediumSoftScore
Source§type Output = HardMediumSoftScore
type Output = HardMediumSoftScore
The resulting type after applying the
- operator.Source§fn neg(self) -> HardMediumSoftScore
fn neg(self) -> HardMediumSoftScore
Performs the unary
- operation. Read moreSource§impl Ord for HardMediumSoftScore
impl Ord for HardMediumSoftScore
Source§fn cmp(&self, other: &HardMediumSoftScore) -> Ordering
fn cmp(&self, other: &HardMediumSoftScore) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl ParseableScore for HardMediumSoftScore
impl ParseableScore for HardMediumSoftScore
fn parse(s: &str) -> Result<HardMediumSoftScore, ScoreParseError>
fn to_string_repr(&self) -> String
Source§impl PartialEq for HardMediumSoftScore
impl PartialEq for HardMediumSoftScore
Source§impl PartialOrd for HardMediumSoftScore
impl PartialOrd for HardMediumSoftScore
Source§impl Score for HardMediumSoftScore
impl Score for HardMediumSoftScore
fn is_feasible(&self) -> bool
fn zero() -> HardMediumSoftScore
fn levels_count() -> usize
fn to_level_numbers(&self) -> Vec<i64>
fn from_level_numbers(levels: &[i64]) -> HardMediumSoftScore
fn multiply(&self, multiplicand: f64) -> HardMediumSoftScore
fn divide(&self, divisor: f64) -> HardMediumSoftScore
fn abs(&self) -> HardMediumSoftScore
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 HardMediumSoftScore
impl Sub for HardMediumSoftScore
Source§type Output = HardMediumSoftScore
type Output = HardMediumSoftScore
The resulting type after applying the
- operator.Source§fn sub(self, other: HardMediumSoftScore) -> HardMediumSoftScore
fn sub(self, other: HardMediumSoftScore) -> HardMediumSoftScore
Performs the
- operation. Read moreimpl Copy for HardMediumSoftScore
impl Eq for HardMediumSoftScore
impl StructuralPartialEq for HardMediumSoftScore
Auto Trait Implementations§
impl Freeze for HardMediumSoftScore
impl RefUnwindSafe for HardMediumSoftScore
impl Send for HardMediumSoftScore
impl Sync for HardMediumSoftScore
impl Unpin for HardMediumSoftScore
impl UnsafeUnpin for HardMediumSoftScore
impl UnwindSafe for HardMediumSoftScore
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more