Struct relp::algorithm::two_phase::matrix_provider::filter::generic_wrapper::RemoveRows[][src]

pub struct RemoveRows<'a, MP> {
    pub rows_to_skip: Vec<usize>,
    // some fields omitted
}
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]

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 the MatrixProvider 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]

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]

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]

How many constraints were removed.

Trait Implementations

impl<'a, MP: Debug> Debug for RemoveRows<'a, MP>[src]

fn fmt(&self, f: &mut Formatter<'_>) -> Result[src]

Formats the value using the given formatter. Read more

impl<'provider, MP> Display for RemoveRows<'provider, MP> where
    MP: MatrixProvider<Column: IntoFilteredColumn>,
    <<MP as MatrixProvider>::Column as IntoFilteredColumn>::Filtered: OrderedColumn
[src]

fn fmt(&self, f: &mut Formatter<'_>) -> Result[src]

Formats the value using the given formatter. Read more

impl<'provider, MP> FeasibilityLogic for RemoveRows<'provider, MP> where
    MP: MatrixProvider<Column: IntoFilteredColumn> + FeasibilityLogic
[src]

fn is_feasible(&self, j: usize, value: <MP::Column as Column>::F) -> bool[src]

Whether a variable is integer. Read more

fn closest_feasible(
    &self,
    j: usize,
    value: <MP::Column as Column>::F
) -> (Option<<MP::Column as Column>::F>, Option<<MP::Column as Column>::F>)
[src]

Closest feasible variable to the left and right. Read more

impl<'provider, MP> Filtered for RemoveRows<'provider, MP> where
    MP: MatrixProvider<Column: IntoFilteredColumn>, 
[src]

fn filtered_rows(&self) -> &[usize][src]

The rows that were removed. Read more

impl<'provider, MP> MatrixProvider for RemoveRows<'provider, MP> where
    MP: MatrixProvider<Column: IntoFilteredColumn>, 
[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]

This implementation assumes that only constraint rows are removed from the MatrixProvider.

type Column = <MP::Column as IntoFilteredColumn>::Filtered

Representation of a column of the matrix. Read more

type Cost = MP::Cost

Cost row type. Read more

type Rhs = MP::Rhs

Right hand side type.

fn column(&self, j: usize) -> Self::Column[src]

Column of the problem. Read more

fn cost_value(&self, j: usize) -> Self::Cost[src]

Cost of a variable. Read more

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]

Index of the row of a virtual bound, if any. Read more

fn nr_rows(&self) -> usize[src]

The total number of rows in the provided virtual matrix.

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]

Reconstruct a solution. Read more

impl<'a, MP: PartialEq> PartialEq<RemoveRows<'a, MP>> for RemoveRows<'a, MP>[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]

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

impl<'a, MP> Send for RemoveRows<'a, MP> where
    MP: Sync

impl<'a, MP> Sync for RemoveRows<'a, MP> where
    MP: Sync

impl<'a, MP> Unpin for RemoveRows<'a, MP>

impl<'a, MP> UnwindSafe for RemoveRows<'a, MP> where
    MP: RefUnwindSafe

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

pub fn type_id(&self) -> TypeId[src]

Gets the TypeId of self. Read more

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

pub fn borrow(&self) -> &T[src]

Immutably borrows from an owned value. Read more

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

pub fn borrow_mut(&mut self) -> &mut T[src]

Mutably borrows from an owned value. Read more

impl<T> From<T> for T[src]

pub fn from(t: T) -> T[src]

Performs the conversion.

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

pub fn into(self) -> U[src]

Performs the conversion.

impl<T> ToString for T where
    T: Display + ?Sized
[src]

pub default fn to_string(&self) -> String[src]

Converts the given value to a String. Read more

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]

Performs the conversion.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>[src]

Performs the conversion.