pub struct SquareComponent {
pub eq_rows: Vec<usize>,
pub cols: Vec<usize>,
}Expand description
One connected component of the square sub-graph.
§Invariant
Every row in eq_rows must be matched to some column in cols
under the bipartite matching that produced this component.
Downstream code (notably crate::btf::BlockTriangularForm)
relies on m.row_to_var[r] being Some for every r ∈ eq_rows. Construct only via SquareComponents::of_square_part,
which preserves this invariant by filtering on DMPart::Square.
Hand-constructing a SquareComponent with unmatched rows
violates the invariant and causes BlockTriangularForm to
panic.
Fields§
§eq_rows: Vec<usize>Equality-row indices (positions in inc.eq_row_inner_idx).
See struct-level invariant: must be matched.
cols: Vec<usize>Variable indices. Same length as eq_rows.
Trait Implementations§
Source§impl Clone for SquareComponent
impl Clone for SquareComponent
Source§fn clone(&self) -> SquareComponent
fn clone(&self) -> SquareComponent
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for SquareComponent
impl Debug for SquareComponent
Source§impl Default for SquareComponent
impl Default for SquareComponent
Source§fn default() -> SquareComponent
fn default() -> SquareComponent
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for SquareComponent
impl RefUnwindSafe for SquareComponent
impl Send for SquareComponent
impl Sync for SquareComponent
impl Unpin for SquareComponent
impl UnsafeUnpin for SquareComponent
impl UnwindSafe for SquareComponent
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