pub struct DirectForm1<T> {
pub xy: [T; 4],
}Expand description
SOS state
Fields§
§xy: [T; 4]X,Y state
Contents before process(): [x1, x2, y1, y2]
Trait Implementations§
Source§impl<T: Clone> Clone for DirectForm1<T>
impl<T: Clone> Clone for DirectForm1<T>
Source§fn clone(&self) -> DirectForm1<T>
fn clone(&self) -> DirectForm1<T>
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl<T: Debug> Debug for DirectForm1<T>
impl<T: Debug> Debug for DirectForm1<T>
Source§impl<T: Default> Default for DirectForm1<T>
impl<T: Default> Default for DirectForm1<T>
Source§fn default() -> DirectForm1<T>
fn default() -> DirectForm1<T>
Returns the “default value” for a type. Read more
Source§impl<'de, T> Deserialize<'de> for DirectForm1<T>where
T: Deserialize<'de>,
impl<'de, T> Deserialize<'de> for DirectForm1<T>where
T: Deserialize<'de>,
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl<T> Serialize for DirectForm1<T>where
T: Serialize,
impl<T> Serialize for DirectForm1<T>where
T: Serialize,
Source§impl<C, T: Copy> SplitInplace<T, DirectForm1<T>> for Normal<C>where
Self: SplitProcess<T, T, DirectForm1<T>>,
impl<C, T: Copy> SplitInplace<T, DirectForm1<T>> for Normal<C>where
Self: SplitProcess<T, T, DirectForm1<T>>,
Source§impl<T: 'static + Copy, C: Copy + Mul<T, Output = A>, A: Add<Output = A> + AsPrimitive<T>> SplitProcess<T, T, DirectForm1<T>> for Biquad<C>
let mut state = DirectForm1 {
xy: [0.0, 1.0, 2.0, 3.0],
};
let x0 = 4.0;
let y0 = Biquad::<f32>::IDENTITY.process(&mut state, x0);
assert_eq!(y0, x0);
assert_eq!(state.xy, [x0, 0.0, y0, 2.0]);
impl<T: 'static + Copy, C: Copy + Mul<T, Output = A>, A: Add<Output = A> + AsPrimitive<T>> SplitProcess<T, T, DirectForm1<T>> for Biquad<C>
let mut state = DirectForm1 {
xy: [0.0, 1.0, 2.0, 3.0],
};
let x0 = 4.0;
let y0 = Biquad::<f32>::IDENTITY.process(&mut state, x0);
assert_eq!(y0, x0);
assert_eq!(state.xy, [x0, 0.0, y0, 2.0]);Source§impl<T: Copy + Add<Output = T> + PartialOrd, C> SplitProcess<T, T, DirectForm1<T>> for BiquadClamp<C, T>where
Biquad<C>: SplitProcess<T, T, DirectForm1<T>>,
use dsp_process::SplitProcess;
use idsp::iir::*;
let biquad = BiquadClamp::<f32, f32>::from(Biquad::IDENTITY);
let mut state = DirectForm2Transposed::default();
let x = 3.0f32;
let y = biquad.process(&mut state, x);
assert_eq!(x, y);
impl<T: Copy + Add<Output = T> + PartialOrd, C> SplitProcess<T, T, DirectForm1<T>> for BiquadClamp<C, T>where
Biquad<C>: SplitProcess<T, T, DirectForm1<T>>,
use dsp_process::SplitProcess;
use idsp::iir::*;
let biquad = BiquadClamp::<f32, f32>::from(Biquad::IDENTITY);
let mut state = DirectForm2Transposed::default();
let x = 3.0f32;
let y = biquad.process(&mut state, x);
assert_eq!(x, y);Auto Trait Implementations§
impl<T> Freeze for DirectForm1<T>where
T: Freeze,
impl<T> RefUnwindSafe for DirectForm1<T>where
T: RefUnwindSafe,
impl<T> Send for DirectForm1<T>where
T: Send,
impl<T> Sync for DirectForm1<T>where
T: Sync,
impl<T> Unpin for DirectForm1<T>where
T: Unpin,
impl<T> UnwindSafe for DirectForm1<T>where
T: UnwindSafe,
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