pub struct Tableau { /* private fields */ }
Implementations§
Source§impl Tableau
impl Tableau
pub fn new( c: Vec<f64>, a: Vec<Vec<f64>>, b: Vec<f64>, in_basis: Vec<usize>, current_value: f64, value_offset: f64, variables: Vec<String>, flip_result: bool, ) -> Tableau
pub fn flip_result(&self) -> bool
pub fn solve(&mut self, limit: i64) -> Result<OptimalTableau, SimplexError>
pub fn variables(&self) -> &Vec<String>
pub fn solve_step_by_step( &mut self, limit: i64, ) -> Result<OptimalTableauWithSteps, SimplexError>
pub fn solve_avoiding( &mut self, limit: i64, variables_to_avoid: &[usize], ) -> Result<OptimalTableau, SimplexError>
pub fn step( &mut self, variables_to_avoid: &[usize], ) -> Result<StepAction, SimplexError>
pub fn current_value(&self) -> f64
pub fn value_offset(&self) -> f64
pub fn a_matrix(&self) -> &Vec<Vec<f64>>
pub fn b_vec(&self) -> &Vec<f64>
pub fn c_vec(&self) -> &Vec<f64>
pub fn in_basis(&self) -> &Vec<usize>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Tableau
impl RefUnwindSafe for Tableau
impl Send for Tableau
impl Sync for Tableau
impl Unpin for Tableau
impl UnwindSafe for Tableau
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more