pub struct LinearProgram {
pub c: Vec<f64>,
pub a: Vec<Vec<f64>>,
pub b: Vec<f64>,
pub n_vars: usize,
pub n_constraints: usize,
}Fields§
§c: Vec<f64>§a: Vec<Vec<f64>>§b: Vec<f64>§n_vars: usize§n_constraints: usizeImplementations§
Source§impl LinearProgram
impl LinearProgram
pub fn new(c: Vec<f64>, a: Vec<Vec<f64>>, b: Vec<f64>) -> Self
pub fn solve(&self) -> LpResult
pub fn is_feasible(&self, x: &[f64]) -> bool
pub fn objective(&self, x: &[f64]) -> f64
pub fn dual(&self) -> LinearProgram
pub fn shadow_prices(&self) -> Vec<f64>
pub fn reduced_costs(&self) -> Vec<f64>
Trait Implementations§
Source§impl Clone for LinearProgram
impl Clone for LinearProgram
Source§fn clone(&self) -> LinearProgram
fn clone(&self) -> LinearProgram
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 moreAuto Trait Implementations§
impl Freeze for LinearProgram
impl RefUnwindSafe for LinearProgram
impl Send for LinearProgram
impl Sync for LinearProgram
impl Unpin for LinearProgram
impl UnsafeUnpin for LinearProgram
impl UnwindSafe for LinearProgram
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