pub struct Threshold {
weighted_parameters: WeightedSum<Parameter>,
constant: Fraction,
}Expand description
WeightedSum of Parameters with additional constant summand
This struct represents a sum over Parameter of the form
c_1 * p_1 + ... + c_n * p_n + c
where p_1, …, p_n are Parameter and c_1,..,c_n, c are rational numbers
represented by Fractions.
Fields§
§weighted_parameters: WeightedSum<Parameter>§constant: FractionImplementations§
Source§impl Threshold
impl Threshold
Sourcepub fn from_const<T: Into<Fraction>>(c: T) -> Self
pub fn from_const<T: Into<Fraction>>(c: T) -> Self
Create a new Threshold from a constant without any parameters
Sourcepub fn is_constant(&self) -> bool
pub fn is_constant(&self) -> bool
Check whether the Threshold only contains a constant
Trait Implementations§
impl Eq for Threshold
Source§impl<T> IntoNoDivBooleanExpr<T> for Threshold
impl<T> IntoNoDivBooleanExpr<T> for Threshold
Source§fn get_scaled_integer_expression(
&self,
scaling_factor: u32,
) -> IntegerExpression<T>
fn get_scaled_integer_expression( &self, scaling_factor: u32, ) -> IntegerExpression<T>
Get the scaled integer expression Read more
Source§fn get_lcm_of_denominators(&self) -> u32
fn get_lcm_of_denominators(&self) -> u32
Get the lcm across all denominators in the object Read more
Source§fn encode_comparison_to_boolean_expression<Q>(
&self,
comparison_op: ComparisonOp,
other: &Q,
) -> BooleanExpression<T>where
Q: IntoNoDivBooleanExpr<T>,
fn encode_comparison_to_boolean_expression<Q>(
&self,
comparison_op: ComparisonOp,
other: &Q,
) -> BooleanExpression<T>where
Q: IntoNoDivBooleanExpr<T>,
Encode the comparison of two expressions into a boolean expression with a
that does not contain any real numbers. Read more
Source§impl Ord for Threshold
impl Ord for Threshold
1.21.0 (const: unstable) · 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 PartialOrd for Threshold
impl PartialOrd for Threshold
impl StructuralPartialEq for Threshold
Auto Trait Implementations§
impl Freeze for Threshold
impl RefUnwindSafe for Threshold
impl Send for Threshold
impl Sync for Threshold
impl Unpin for Threshold
impl UnsafeUnpin for Threshold
impl UnwindSafe for Threshold
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