pub struct Problem { /* private fields */ }Expand description
A struct representing a problem in the Papilo library.
Implementations§
Source§impl Problem
impl Problem
Sourcepub fn raw(&self) -> *mut Papilo_Problem
pub fn raw(&self) -> *mut Papilo_Problem
Returns a raw pointer to the underlying Papilo_Problem.
Sourcepub fn add_col(
&mut self,
lb: f64,
ub: f64,
integer: bool,
cost: f64,
name: &str,
) -> usize
pub fn add_col( &mut self, lb: f64, ub: f64, integer: bool, cost: f64, name: &str, ) -> usize
Adds a column to the problem.
Sourcepub fn add_row(
&mut self,
name: &str,
coefficients: &[(usize, f64)],
lhs: f64,
rhs: f64,
) -> usize
pub fn add_row( &mut self, name: &str, coefficients: &[(usize, f64)], lhs: f64, rhs: f64, ) -> usize
Adds a row to the problem.
Sourcepub fn set_row_coef(&mut self, row_id: usize, col_id: usize, value: f64)
pub fn set_row_coef(&mut self, row_id: usize, col_id: usize, value: f64)
Sets a coefficient for a specific row and column.
Trait Implementations§
Auto Trait Implementations§
impl !Send for Problem
impl !Sync for Problem
impl Freeze for Problem
impl RefUnwindSafe for Problem
impl Unpin for Problem
impl UnsafeUnpin for Problem
impl UnwindSafe for Problem
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