Struct sameold::EqualizerBuilder
source · [−]pub struct EqualizerBuilder { /* private fields */ }Expand description
Builder for the SAME/EAS decision-feedback equalizer
Implementations
sourceimpl EqualizerBuilder
impl EqualizerBuilder
sourcepub fn with_filter_order(
&mut self,
nfeedforward: usize,
nfeedback: usize
) -> &mut Self
pub fn with_filter_order(
&mut self,
nfeedforward: usize,
nfeedback: usize
) -> &mut Self
Set filter order
The filter order controls how many feedforward taps and feedback taps the adaptive filter has to work with.
Higher orders may allow a better fit for channels with longer or more complicated impulse responses. Using a model order that is too high risks overfitting, numeric stability issues, and latency as the filter takes longer to evolve.
We recommend keeping this relatively low. After all, the channel must be suitable for speech signals for human listeners.
Each filter must have at least one tap.
sourcepub fn with_relaxation(&mut self, relaxation: f32) -> &mut Self
pub fn with_relaxation(&mut self, relaxation: f32) -> &mut Self
NLMS relaxation
Sets the Normalized Least Mean Squares (NLMS) relaxation
parameter. relaxation is the the distance to move each
new impulse response estimate to the zero posteriori error
point: 1.0 goes all the way, while 0.0 doesn’t move at all.
Sometimes called “mu” or “gain.”
This parameter should be set high enough that the algorithm converges during the preamble, before the data is read.
sourcepub fn with_regularization(&mut self, regularization: f32) -> &mut Self
pub fn with_regularization(&mut self, regularization: f32) -> &mut Self
NLMS regularization
Sets the Normalized Least Mean Squares (NLMS) regularization
parameter. regularization is a main-diagonal weighting
constant that helps keep matrices invertible. Sometimes called
“delta.” Set to zero to disable regularization.
We recommend leaving this parameter alone.
sourcepub fn filter_order(&self) -> (usize, usize)
pub fn filter_order(&self) -> (usize, usize)
Filter order
Returns filter order of the (feedforward, feedback) portions
of the adaptive filter, respectively.
sourcepub fn relaxation(&self) -> f32
pub fn relaxation(&self) -> f32
NLMS relaxation
sourcepub fn regularization(&self) -> f32
pub fn regularization(&self) -> f32
NLMS regularization
Trait Implementations
sourceimpl Clone for EqualizerBuilder
impl Clone for EqualizerBuilder
sourcefn clone(&self) -> EqualizerBuilder
fn clone(&self) -> EqualizerBuilder
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read more
sourceimpl Debug for EqualizerBuilder
impl Debug for EqualizerBuilder
sourceimpl Default for EqualizerBuilder
impl Default for EqualizerBuilder
sourceimpl PartialEq<EqualizerBuilder> for EqualizerBuilder
impl PartialEq<EqualizerBuilder> for EqualizerBuilder
sourcefn eq(&self, other: &EqualizerBuilder) -> bool
fn eq(&self, other: &EqualizerBuilder) -> bool
This method tests for self and other values to be equal, and is used
by ==. Read more
sourcefn ne(&self, other: &EqualizerBuilder) -> bool
fn ne(&self, other: &EqualizerBuilder) -> bool
This method tests for !=.
sourceimpl PartialOrd<EqualizerBuilder> for EqualizerBuilder
impl PartialOrd<EqualizerBuilder> for EqualizerBuilder
sourcefn partial_cmp(&self, other: &EqualizerBuilder) -> Option<Ordering>
fn partial_cmp(&self, other: &EqualizerBuilder) -> Option<Ordering>
This method returns an ordering between self and other values if one exists. Read more
1.0.0 · sourcefn lt(&self, other: &Rhs) -> bool
fn lt(&self, other: &Rhs) -> bool
This method tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · sourcefn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for self and other) and is used by the <=
operator. Read more
impl Copy for EqualizerBuilder
impl StructuralPartialEq for EqualizerBuilder
Auto Trait Implementations
impl RefUnwindSafe for EqualizerBuilder
impl Send for EqualizerBuilder
impl Sync for EqualizerBuilder
impl Unpin for EqualizerBuilder
impl UnwindSafe for EqualizerBuilder
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<SS, SP> SupersetOf<SS> for SP where
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SP where
SS: SubsetOf<SP>,
fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
The inverse inclusion map: attempts to construct self from the equivalent element of its
superset. Read more
fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if self is actually part of its subset T (and can be converted to it).
fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
Use with care! Same as self.to_subset but without any property checks. Always succeeds.
fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts self to the equivalent element of its superset.