Skip to main content

ILPCoefficient

Trait ILPCoefficient 

Source
pub trait ILPCoefficient:
    NumericSize
    + WeightElement<Sum = Self>
    + Copy
    + Debug
    + Send
    + Sync {
    const NAME: &'static str;

    // Required methods
    fn from_integer(value: i64) -> Result<Self, EvaluationError>;
    fn satisfies(lhs: Self, comparison: Comparison, rhs: Self) -> bool;
}
Expand description

Numeric domain shared by an ILP’s constraints, right-hand sides, and objective.

Required Associated Constants§

Source

const NAME: &'static str

Name used by the registered variant dimension.

Required Methods§

Source

fn from_integer(value: i64) -> Result<Self, EvaluationError>

Convert an integer variable value into this coefficient domain.

Source

fn satisfies(lhs: Self, comparison: Comparison, rhs: Self) -> bool

Compare a finite evaluated row with its right-hand side.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl ILPCoefficient for f64

Source§

const NAME: &'static str = "f64"

Source§

fn from_integer(value: i64) -> Result<Self, EvaluationError>

Source§

fn satisfies(lhs: Self, comparison: Comparison, rhs: Self) -> bool

Source§

impl ILPCoefficient for i64

Source§

const NAME: &'static str = "i64"

Source§

fn from_integer(value: i64) -> Result<Self, EvaluationError>

Source§

fn satisfies(lhs: Self, comparison: Comparison, rhs: Self) -> bool

Implementors§