pub struct LinearSpectralSolver;Expand description
Solver for Linear Time-Invariant (LTI) systems y’ = My using spectral decomposition. Efficient for constant matrices, as it avoids time-stepping.
Implementations§
Source§impl LinearSpectralSolver
impl LinearSpectralSolver
Sourcepub fn solve_tridiagonal(
diag: Vec<f64>,
off_diag: Vec<f64>,
y0: &[f64],
t: f64,
) -> Vec<f64>
pub fn solve_tridiagonal( diag: Vec<f64>, off_diag: Vec<f64>, y0: &[f64], t: f64, ) -> Vec<f64>
Solves y(t) = exp(A * t) * y0 for a symmetric tridiagonal matrix A.
§Arguments
diag- Diagonal elements of A.off_diag- Off-diagonal elements of A.y0- Initial state vector at t=0.t- Time horizon to propagate to.
Auto Trait Implementations§
impl Freeze for LinearSpectralSolver
impl RefUnwindSafe for LinearSpectralSolver
impl Send for LinearSpectralSolver
impl Sync for LinearSpectralSolver
impl Unpin for LinearSpectralSolver
impl UnsafeUnpin for LinearSpectralSolver
impl UnwindSafe for LinearSpectralSolver
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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> ⓘ
Converts
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> ⓘ
Converts
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