Struct img_hash::DCT2DFunc[][src]

pub struct DCT2DFunc(pub fn(_: &[f64], _: Rowstride) -> Vec<f64>);

A 2-dimensional Discrete Cosine Transform function that receives and returns 1-dimensional packed data.

The function will be provided the pre-hash data as a 1D-packed vector, which should be interpreted as a 2D matrix with a given rowstride:

Pre-hash data:
[ 1.0 2.0 3.0 ]
[ 4.0 5.0 6.0 ]
[ 7.0 8.0 9.0 ]

Packed: [1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0] (rowstride 3)

The function should then return a new 1D vector of the DCT values packed in the same manner.

Trait Implementations

impl Copy for DCT2DFunc
[src]

impl Clone for DCT2DFunc
[src]

Function pointers implement Copy but not Clone, so this simply returns a copy of self.

Performs copy-assignment from source. Read more

impl PartialEq for DCT2DFunc
[src]

Naive equality comparison just looking at the numerical values of the function pointers.

This method tests for !=.

impl Eq for DCT2DFunc
[src]

impl Debug for DCT2DFunc
[src]

Formats the value using the given formatter. Read more

impl Hash for DCT2DFunc
[src]

Adds the contained function pointer as usize.

Feeds a slice of this type into the given [Hasher]. Read more

Auto Trait Implementations

impl Send for DCT2DFunc

impl Sync for DCT2DFunc