Struct Dst5Naive

Source
pub struct Dst5Naive<T> { /* private fields */ }
Expand description

Naive O(n^2 ) DST Type 5 implementation

This implementation is primarily used to test other DST5 algorithms.

// Computes a naive DST5 of size 23
use rustdct::Dst5;
use rustdct::algorithm::Dst5Naive;

let len = 23;
let mut buffer = vec![0f32; len];

let dst = Dst5Naive::new(len);
dst.process_dst5(&mut buffer);

Implementations§

Source§

impl<T: DctNum> Dst5Naive<T>

Source

pub fn new(len: usize) -> Self

Creates a new DST5 context that will process signals of length len

Trait Implementations§

Source§

impl<T: DctNum> Dst5<T> for Dst5Naive<T>

Source§

fn process_dst5_with_scratch(&self, buffer: &mut [T], scratch: &mut [T])

Computes the DST Type 5 on the provided buffer, in-place. Uses the provided scratch buffer as scratch space. Read more
Source§

fn process_dst5(&self, buffer: &mut [T])

Computes the DST Type 5 on the provided buffer, in-place. Read more
Source§

impl<T> Length for Dst5Naive<T>

Source§

fn len(&self) -> usize

The FFT size that this algorithm can process
Source§

impl<T> RequiredScratch for Dst5Naive<T>

Auto Trait Implementations§

§

impl<T> Freeze for Dst5Naive<T>

§

impl<T> RefUnwindSafe for Dst5Naive<T>
where T: RefUnwindSafe,

§

impl<T> Send for Dst5Naive<T>
where T: Send,

§

impl<T> Sync for Dst5Naive<T>
where T: Sync,

§

impl<T> Unpin for Dst5Naive<T>

§

impl<T> UnwindSafe for Dst5Naive<T>
where T: UnwindSafe,

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, U> TryFrom<U> for T
where U: Into<T>,

Source§

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>,

Source§

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.