pub struct ComplexFrequencyLinearTableLookup<T>
where T: RealNumber,
{ /* private fields */ }
Expand description

Allows to create a lookup table with linear interpolation between table points. This usually speeds up a convolution and sacrifices accuracy.

Implementations§

source§

impl<T> ComplexFrequencyLinearTableLookup<T>
where T: RealNumber,

source

pub fn table(&self) -> &[Complex<T>]

Allows to inspect the generated lookup table

source

pub fn delta(&self) -> T

Gets the delta value which determines the resolution

source§

impl ComplexFrequencyLinearTableLookup<f32>

source

pub fn from_raw_parts( table: &[Complex<f32>], delta: f32, is_symmetric: bool ) -> ComplexFrequencyLinearTableLookup<f32>

Creates a lookup table by putting the pieces together.

source

pub fn from_conv_function( other: &dyn ComplexFrequencyResponse<f32>, delta: f32, len: usize ) -> ComplexFrequencyLinearTableLookup<f32>

Creates a lookup table from another convolution function. The delta argument can be used to balance performance vs. accuracy.

source§

impl ComplexFrequencyLinearTableLookup<f64>

source

pub fn from_raw_parts( table: &[Complex<f64>], delta: f64, is_symmetric: bool ) -> ComplexFrequencyLinearTableLookup<f64>

Creates a lookup table by putting the pieces together.

source

pub fn from_conv_function( other: &dyn ComplexFrequencyResponse<f64>, delta: f64, len: usize ) -> ComplexFrequencyLinearTableLookup<f64>

Creates a lookup table from another convolution function. The delta argument can be used to balance performance vs. accuracy.

source§

impl ComplexFrequencyLinearTableLookup<f32>

source

pub fn to_real(&self) -> RealFrequencyLinearTableLookup<f32>

Convert the lookup table into real number space

source§

impl ComplexFrequencyLinearTableLookup<f64>

source

pub fn to_real(&self) -> RealFrequencyLinearTableLookup<f64>

Convert the lookup table into real number space

source§

impl ComplexFrequencyLinearTableLookup<f32>

source

pub fn ifft(self) -> ComplexTimeLinearTableLookup<f32>

Convert the lookup table into time domain

source§

impl ComplexFrequencyLinearTableLookup<f64>

source

pub fn ifft(self) -> ComplexTimeLinearTableLookup<f64>

Convert the lookup table into time domain

Trait Implementations§

source§

impl ComplexFrequencyResponse<f32> for ComplexFrequencyLinearTableLookup<f32>

source§

fn is_symmetric(&self) -> bool

Indicates whether this function is symmetric around 0 or not. Symmetry is defined as self.calc(x) == self.calc(-x).
source§

fn calc(&self, x: f32) -> Complex<f32>

Calculates the convolution for a data point
source§

impl ComplexFrequencyResponse<f64> for ComplexFrequencyLinearTableLookup<f64>

source§

fn is_symmetric(&self) -> bool

Indicates whether this function is symmetric around 0 or not. Symmetry is defined as self.calc(x) == self.calc(-x).
source§

fn calc(&self, x: f64) -> Complex<f64>

Calculates the convolution for a data point

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> Pointable for T

source§

const ALIGN: usize = _

The alignment of pointer.
§

type Init = T

The type for initializers.
source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.