pub struct PronyModel { /* private fields */ }Expand description
y(x) = Re Σ_i c_i z_i^((x - x0)/dx) fitted to samples at x0 + k dx. Each z_i is a
discrete-time pole (|z| is the per-sample decay, arg z the per-sample phase advance), which
makes the model both an interpolator and an extrapolator for damped oscillations.
Implementations§
Source§impl PronyModel
impl PronyModel
Sourcepub fn new(
y: VR1D<'_>,
x0: f64,
dx: f64,
order: usize,
) -> Result<Self, ErrorsJSL>
pub fn new( y: VR1D<'_>, x0: f64, dx: f64, order: usize, ) -> Result<Self, ErrorsJSL>
Fits order exponentials to y (needs y.len() >= 2 * order; extra samples are used in a
least-squares sense, which averages down noise).
Sourcepub fn amplitudes(&self) -> &[Complex<f64>]
pub fn amplitudes(&self) -> &[Complex<f64>]
The complex amplitudes c_i.
Trait Implementations§
Source§impl Clone for PronyModel
impl Clone for PronyModel
Auto Trait Implementations§
impl Freeze for PronyModel
impl RefUnwindSafe for PronyModel
impl Send for PronyModel
impl Sync for PronyModel
impl Unpin for PronyModel
impl UnsafeUnpin for PronyModel
impl UnwindSafe for PronyModel
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