pub struct Grounding { /* private fields */ }Expand description
A sorted, de-duplicated set of grounded indices and the reduced-index map it
induces: drop the grounded rows/columns and shift the survivors down to a
dense [0, n − k) range. This is the index map of ground_at_each, so a
solver that factors ground_at_each(&laplacian, refs) scatters its reduced
solution back to full bus order through the same Grounding::new(refs).
GroundedIndexMap is the single-reference special case and reads the
same index map. The PTDF builder and the DC operators’ reference
constrained system share it, so the row/column removal lives in one place.
Implementations§
Source§impl Grounding
impl Grounding
Sourcepub fn reduced(&self, i: usize) -> Option<usize>
pub fn reduced(&self, i: usize) -> Option<usize>
Full index → reduced index, or None for a grounded index. The shift is
i − (number of grounds strictly below i).
Sourcepub fn full(&self, reduced: usize) -> usize
pub fn full(&self, reduced: usize) -> usize
Reduced index → full index: the full index of the reduced-th
surviving row.
Sourcepub fn full_of_reduced(&self, n: usize) -> Vec<usize>
pub fn full_of_reduced(&self, n: usize) -> Vec<usize>
Full indices of the surviving rows of an n-wide space, in reduced
index order: entry r is the full index of reduced index r.
Trait Implementations§
impl Eq for Grounding
impl StructuralPartialEq for Grounding
Auto Trait Implementations§
impl Freeze for Grounding
impl RefUnwindSafe for Grounding
impl Send for Grounding
impl Sync for Grounding
impl Unpin for Grounding
impl UnsafeUnpin for Grounding
impl UnwindSafe for Grounding
Blanket Implementations§
impl<T> Allocation for T
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.