pub struct LpSolversCompat<'a> { /* private fields */ }Expand description
A validated wrapper that guarantees compatibility with lp-solvers.
Implementations§
Source§impl<'a> LpSolversCompat<'a>
impl<'a> LpSolversCompat<'a>
Sourcepub fn try_new(problem: &'a LpProblem) -> Result<Self, LpSolversCompatError>
pub fn try_new(problem: &'a LpProblem) -> Result<Self, LpSolversCompatError>
Sourcepub fn warnings(&self) -> &[LpSolversCompatWarning]
pub fn warnings(&self) -> &[LpSolversCompatWarning]
Returns any warnings generated during validation.
Sourcepub fn is_fully_compatible(&self) -> bool
pub fn is_fully_compatible(&self) -> bool
Returns true if there are no warnings.
Trait Implementations§
Source§impl<'a> Debug for LpSolversCompat<'a>
impl<'a> Debug for LpSolversCompat<'a>
Source§impl<'a> LpProblem<'a> for LpSolversCompat<'a>
impl<'a> LpProblem<'a> for LpSolversCompat<'a>
Source§type Variable = VariableAdapter<'a>
type Variable = VariableAdapter<'a>
variable type
Source§type Expression = ExpressionAdapter<'a>
type Expression = ExpressionAdapter<'a>
expression type
Source§type ConstraintIterator = ConstraintIterator<'a>
type ConstraintIterator = ConstraintIterator<'a>
Iterator over constraints
Source§type VariableIterator = VariableIterator<'a>
type VariableIterator = VariableIterator<'a>
Iterator over variables
Source§fn variables(&'a self) -> Self::VariableIterator
fn variables(&'a self) -> Self::VariableIterator
Variables of the problem
Source§fn objective(&'a self) -> Self::Expression
fn objective(&'a self) -> Self::Expression
Target objective function
Source§fn sense(&'a self) -> LpObjective
fn sense(&'a self) -> LpObjective
Whether to maximize or minimize the objective
Source§fn constraints(&'a self) -> Self::ConstraintIterator
fn constraints(&'a self) -> Self::ConstraintIterator
List of constraints to apply
Source§fn to_lp_file_format(&'a self, f: &mut Formatter<'_>) -> Result<(), Error>
fn to_lp_file_format(&'a self, f: &mut Formatter<'_>) -> Result<(), Error>
Write the problem in the lp file format to the given formatter
Source§fn display_lp(&'a self) -> DisplayedLp<'a, Self>where
Self: Sized,
fn display_lp(&'a self) -> DisplayedLp<'a, Self>where
Self: Sized,
Return an object whose fmt::Display implementation is the problem in the .lp format
Source§fn to_tmp_file(&'a self) -> Result<NamedTempFile, Error>where
Self: Sized,
fn to_tmp_file(&'a self) -> Result<NamedTempFile, Error>where
Self: Sized,
Write the problem to a temporary file
Auto Trait Implementations§
impl<'a> Freeze for LpSolversCompat<'a>
impl<'a> RefUnwindSafe for LpSolversCompat<'a>
impl<'a> Send for LpSolversCompat<'a>
impl<'a> Sync for LpSolversCompat<'a>
impl<'a> Unpin for LpSolversCompat<'a>
impl<'a> UnsafeUnpin for LpSolversCompat<'a>
impl<'a> UnwindSafe for LpSolversCompat<'a>
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