pub struct AugmentedPattern { /* private fields */ }Expand description
A JacobianPattern plus the border, in one fixed emission order:
the Jacobian’s own entries, then the λ column top to bottom, then the
border row’s own columns in order.
Implementations§
Source§impl AugmentedPattern
impl AugmentedPattern
pub fn analyze( buses: &[Bus], ybus: &YBusSparse, border_cols: Vec<usize>, ) -> Self
Sourcepub fn border_cols(&self) -> &[usize]
pub fn border_cols(&self) -> &[usize]
The columns this pattern’s border row occupies. A caller whose parametrization now wants different ones must re-analyze.
pub fn len(&self) -> usize
pub fn is_empty(&self) -> bool
Sourcepub fn to_triplets(&self, values: &[f64]) -> Vec<(usize, usize, f64)>
pub fn to_triplets(&self, values: &[f64]) -> Vec<(usize, usize, f64)>
(row, col) pairs in emission order, with the values supplied — the
shape every LinearSolver backend
analyzes once.
Sourcepub fn fill(
&self,
buses: &[Bus],
p_calc: &[f64],
q_calc: &[f64],
ds: &[f64],
border: &[f64],
values: &mut Vec<f64>,
)
pub fn fill( &self, buses: &[Bus], p_calc: &[f64], q_calc: &[f64], ds: &[f64], border: &[f64], values: &mut Vec<f64>, )
Refills every value at its fixed offset.
ds is the direction in Newton row order (see
Layout::direction_rows) and border holds the row’s values at
border_cols, in that order.
The λ column carries ∂g/∂λ = −Δs; getting that sign wrong is the
single easiest way to produce a curve that looks plausible and is wrong,
which is why the test suite re-checks every returned point against an
independently-built power flow.
Auto Trait Implementations§
impl Freeze for AugmentedPattern
impl RefUnwindSafe for AugmentedPattern
impl Send for AugmentedPattern
impl Sync for AugmentedPattern
impl Unpin for AugmentedPattern
impl UnsafeUnpin for AugmentedPattern
impl UnwindSafe for AugmentedPattern
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> DistributionExt for Twhere
T: ?Sized,
impl<T> DistributionExt for Twhere
T: ?Sized,
impl<T, U> Imply<T> for U
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more