pub fn from_artificial_removing_rows(
        inverse_maintainer: IM,
        nr_artificial: usize,
        mut basis: HashSet<usize>,
        provider: &'provider MP,
    ) -> Self {
        debug_assert!(basis.iter().all(|&v| v >= nr_artificial || provider.filtered_rows().contains(&v)));

        for &row in provider.filtered_rows() {
            let was_there = basis.remove(&inverse_maintainer.basis_column_index_for_row(row));
            debug_assert!(was_there);
        }
        let basis_columns = basis.into_iter().map(|j| j - nr_artificial).collect();

        // Remove same row and column from carry matrix
        let inverse_maintainer = IM::from_artificial_remove_rows(
            inverse_maintainer,
            provider,
            nr_artificial,
        );

        Tableau {
            inverse_maintainer,
            basis_columns,

            kind: NonArtificial {
                provider,
            },
        }
    }
/// Create a `Tableau` from an artificial tableau while removing some rows.
///
/// # Arguments
///
/// * `artificial_tableau`: `Tableau` instance created with artificial variables.
/// * `rows_removed`: `RemoveRows` instance containing all the **sorted** rows that should be
/// removed from e.g. the basis inverse matrix.
///
/// # Return value
///
/// `Tableau` with the same basis, but non-artificial cost row.
Create a `Tableau` from an artificial tableau while removing some rows.
Create a ` Tableau ` from an artificial tableau while removing some rows .
pub fn from_artificial_removing_rows(
        inverse_maintainer: IM,
        nr_artificial: usize,
        mut basis: HashSet<usize>,
        provider: &'provider MP,
    ) -> Self {
        debug_assert!(basis.iter().all(|&v| v >= nr_artificial || provider.filtered_rows().contains(&v)));
        for &row in provider.filtered_rows() {
            let was_there = basis.remove(&inverse_maintainer.basis_column_index_for_row(row));
            debug_assert!(was_there);
        }
        let basis_columns = basis.into_iter().map(|j| j - nr_artificial).collect();
        // Remove same row and column from carry matrix
        let inverse_maintainer = IM::from_artificial_remove_rows(
            inverse_maintainer,
            provider,
            nr_artificial,
        );
        Tableau {
            inverse_maintainer,
            basis_columns,
            kind: NonArtificial {
                provider,
            },
        }
    }
pub fn from_artificial_removing_rows ( inverse_maintainer : IM , nr_artificial : usize , mut basis : HashSet < usize > , provider : & ' provider MP , ) -> Self { debug_assert ! ( basis iter ( ) all ( v v nr_artificial provider filtered_rows ( ) contains ( v ) ) ) ; for & row in provider . filtered_rows ( ) { let was_there = basis . remove ( & inverse_maintainer . basis_column_index_for_row ( row ) ) ; debug_assert ! ( was_there ) ; } let basis_columns = basis . into_iter ( ) . map ( | j | j - nr_artificial ) . collect ( ) ; // Remove same row and column from carry matrix let inverse_maintainer = IM :: from_artificial_remove_rows ( inverse_maintainer , provider , nr_artificial , ) ; Tableau { inverse_maintainer , basis_columns , kind : NonArtificial { provider , } , } }
Create a `Tableau` from an artificial tableau while removing some rows.
Create a ` Tableau ` from an artificial tableau while removing some rows .
inverse_maintainer
IM
nr_artificial
usize
basis
HashSet<usize>
provider
&'provider MP
inverse_maintainer
IM
nr_artificial
usize
basis
HashSet<usize>
provider
&'provider MP
return value
`Tableau` with the same basis, but non-artificial cost row.
` Tableau ` with the same basis but non - artificial cost row .