Struct relp::algorithm::two_phase::matrix_provider::filter::generic_wrapper::RemoveRows [−][src]
Expand description
Wraps a MatrixProvider
, acting as if rows were removed from the inner matrix provider.
Used for deleting duplicate constraints after finding primal feasibility.
Only constraint rows should be deleted, variable bounds should remain intact. TODO(DOCUMENTATION): Check the above property.
Fields
rows_to_skip: Vec<usize>
Expand description
List of rows that this method removes.
Sorted at all times.
Implementations
impl<'provider, MP> RemoveRows<'provider, MP> where
MP: MatrixProvider,
[src]
impl<'provider, MP> RemoveRows<'provider, MP> where
MP: MatrixProvider,
[src]pub fn new(provider: &'provider MP, rows_to_skip: Vec<usize>) -> Self
[src]
pub fn new(provider: &'provider MP, rows_to_skip: Vec<usize>) -> Self
[src]Create a new RemoveRows
instance.
Arguments
provider
: Reference to an instance implementing theMatrixProvider
trait. Rows from this provider will be removed.rows_to_skip
: A sorted list of rows that are skipped.
Return value
A new RemoveRows
instance.
#[must_use]pub fn get_underlying_row_index(&self, i: usize) -> usize
[src]
#[must_use]pub fn get_underlying_row_index(&self, i: usize) -> usize
[src]Get the index of the same row in the original MatrixProvider
.
Arguments
i
: Index of row in the version of the problem from which rows were removed (this struct).
Return value
Index of row in the original problem.
pub fn delete_row(&mut self, i: usize)
[src]
pub fn delete_row(&mut self, i: usize)
[src]Delete a row
Arguments
i
: Index of row in the version of the problem from which rows were removed (this struct).
#[must_use]pub fn nr_constraints_deleted(&self) -> usize
[src]
#[must_use]pub fn nr_constraints_deleted(&self) -> usize
[src]How many constraints were removed.
Trait Implementations
impl<'a, MP: Debug> Debug for RemoveRows<'a, MP>
[src]
impl<'a, MP: Debug> Debug for RemoveRows<'a, MP>
[src]impl<'provider, MP> Display for RemoveRows<'provider, MP> where
MP: MatrixProvider<Column: IntoFilteredColumn>,
<<MP as MatrixProvider>::Column as IntoFilteredColumn>::Filtered: OrderedColumn,
[src]
impl<'provider, MP> Display for RemoveRows<'provider, MP> where
MP: MatrixProvider<Column: IntoFilteredColumn>,
<<MP as MatrixProvider>::Column as IntoFilteredColumn>::Filtered: OrderedColumn,
[src]impl<'provider, MP> FeasibilityLogic for RemoveRows<'provider, MP> where
MP: MatrixProvider<Column: IntoFilteredColumn> + FeasibilityLogic,
[src]
impl<'provider, MP> FeasibilityLogic for RemoveRows<'provider, MP> where
MP: MatrixProvider<Column: IntoFilteredColumn> + FeasibilityLogic,
[src]impl<'provider, MP> Filtered for RemoveRows<'provider, MP> where
MP: MatrixProvider<Column: IntoFilteredColumn>,
[src]
impl<'provider, MP> Filtered for RemoveRows<'provider, MP> where
MP: MatrixProvider<Column: IntoFilteredColumn>,
[src]impl<'provider, MP> MatrixProvider for RemoveRows<'provider, MP> where
MP: MatrixProvider<Column: IntoFilteredColumn>,
[src]
impl<'provider, MP> MatrixProvider for RemoveRows<'provider, MP> where
MP: MatrixProvider<Column: IntoFilteredColumn>,
[src]fn nr_constraints(&self) -> usize
[src]
fn nr_constraints(&self) -> usize
[src]This implementation assumes that only constraint rows are removed from the MatrixProvider
.
fn nr_variable_bounds(&self) -> usize
[src]
fn nr_variable_bounds(&self) -> usize
[src]This implementation assumes that only constraint rows are removed from the MatrixProvider
.
type Column = <MP::Column as IntoFilteredColumn>::Filtered
type Column = <MP::Column as IntoFilteredColumn>::Filtered
Representation of a column of the matrix. Read more
fn cost_value(&self, j: usize) -> Self::Cost
[src]
fn cost_value(&self, j: usize) -> Self::Cost
[src]Cost of a variable. Read more
fn right_hand_side(&self) -> DenseVector<Self::Rhs>
[src]
fn right_hand_side(&self) -> DenseVector<Self::Rhs>
[src]Constraint values. Read more
fn bound_row_index(&self, j: usize, bound_type: BoundDirection) -> Option<usize>
[src]
fn bound_row_index(&self, j: usize, bound_type: BoundDirection) -> Option<usize>
[src]Index of the row of a virtual bound, if any. Read more
fn nr_columns(&self) -> usize
[src]
fn nr_columns(&self) -> usize
[src]The total number of columns in the provided virtual matrix. This does not include artificial
variables; those are virtually represented by the Artificial
TableauType
. Read more
fn reconstruct_solution<G>(
&self,
column_values: SparseVector<G, G>
) -> SparseVector<G, G> where
G: SparseElement<G> + SparseComparator,
[src]
fn reconstruct_solution<G>(
&self,
column_values: SparseVector<G, G>
) -> SparseVector<G, G> where
G: SparseElement<G> + SparseComparator,
[src]Reconstruct a solution. Read more
impl<'a, MP: PartialEq> PartialEq<RemoveRows<'a, MP>> for RemoveRows<'a, MP>
[src]
impl<'a, MP: PartialEq> PartialEq<RemoveRows<'a, MP>> for RemoveRows<'a, MP>
[src]fn eq(&self, other: &RemoveRows<'a, MP>) -> bool
[src]
fn eq(&self, other: &RemoveRows<'a, MP>) -> bool
[src]This method tests for self
and other
values to be equal, and is used
by ==
. Read more
fn ne(&self, other: &RemoveRows<'a, MP>) -> bool
[src]
fn ne(&self, other: &RemoveRows<'a, MP>) -> bool
[src]This method tests for !=
.
impl<'a, MP> StructuralPartialEq for RemoveRows<'a, MP>
[src]
Auto Trait Implementations
impl<'a, MP> RefUnwindSafe for RemoveRows<'a, MP> where
MP: RefUnwindSafe,
MP: RefUnwindSafe,
impl<'a, MP> Send for RemoveRows<'a, MP> where
MP: Sync,
MP: Sync,
impl<'a, MP> Sync for RemoveRows<'a, MP> where
MP: Sync,
MP: Sync,
impl<'a, MP> Unpin for RemoveRows<'a, MP>
impl<'a, MP> UnwindSafe for RemoveRows<'a, MP> where
MP: RefUnwindSafe,
MP: RefUnwindSafe,
Blanket Implementations
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]pub fn borrow_mut(&mut self) -> &mut T
[src]
pub fn borrow_mut(&mut self) -> &mut T
[src]Mutably borrows from an owned value. Read more