Struct chfft::Dct1D [] [src]

pub struct Dct1D<T> { /* fields omitted */ }

Perform a discrete cosine transform

Example

extern crate chfft;

use chfft::Dct1D;

fn main() {
    let input = [2.0, 0.0, 1.0, 1.0, 0.0, 3.0, 2.0, 4.0];

    let mut dct = Dct1D::<f64>::new(2, input.len(), false);
    let output = dct.forward(&input);
    println!("the transform of {:?} is {:?}", input, output);
}

Methods

impl<T: Float + FloatConst + NumAssign> Dct1D<T>
[src]

[src]

Returns a instances to execute DCT

use chfft::Dct1D;
let mut dct = Dct1D::<f64>::new(2, 1024, false);

[src]

Reinitialize length

use chfft::Dct1D;
let mut dct = Dct1D::<f64>::new(2, 1024, false);

// reinitialize
dct.setup(2, 2048, false);

[src]

The 1 scaling factor forward transform

extern crate chfft;

let input = [2.0, 0.0, 1.0, 1.0, 0.0, 3.0, 2.0, 4.0];

let mut dct = chfft::Dct1D::<f64>::new(2, input.len(), false);
let output = dct.forward0(&input);

[src]

The 1 scaling factor forward transform

extern crate chfft;

let input = [2.0, 0.0, 1.0, 1.0, 0.0, 3.0, 2.0, 4.0];

let mut dct = chfft::Dct1D::<f64>::new(2, input.len(), false);
let output = dct.forward0(&input);

[src]

The unitary transform scaling factor forward transform

extern crate chfft;

let input = [2.0, 0.0, 1.0, 1.0, 0.0, 3.0, 2.0, 4.0];

let mut dct = chfft::Dct1D::<f64>::new(2, input.len(), false);
let output = dct.forwardu(&input);

[src]

The inverse scaling factor forward transform

extern crate chfft;

let input = [2.0, 0.0, 1.0, 1.0, 0.0, 3.0, 2.0, 4.0];

let mut dct = chfft::Dct1D::<f64>::new(2, input.len(), false);
let output = dct.forwardu(&input);

Trait Implementations

Auto Trait Implementations

impl<T> Send for Dct1D<T> where
    T: Send

impl<T> Sync for Dct1D<T> where
    T: Sync