Struct basic_dsp_vector::conv_types::ForeignRealConvolutionFunction [] [src]

pub struct ForeignRealConvolutionFunction<T> where T: RealNumber {
    pub conv_function: extern fn(*const c_void, T) -> T,
    pub conv_data: usize,
    pub is_symmetric: bool,
}

A real function which can be constructed outside this crate.

Fields

The function

The data which is passed to the function.

Actual data type is a const* c_void, but Rust doesn't allow that because it's unsafe so we store it as usize and transmute it when necessary. Callers should make very sure safety is guaranteed.

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

Methods

impl<T> ForeignRealConvolutionFunction<T> where T: RealNumber
[src]

Creates a new real function

Trait Implementations

impl<T> RealImpulseResponse<T> for ForeignRealConvolutionFunction<T> where T: RealNumber
[src]

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

Calculates the convolution for a data point

impl<T> RealFrequencyResponse<T> for ForeignRealConvolutionFunction<T> where T: RealNumber
[src]

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

Calculates the convolution for a data point