Dew MtxVec NET
TVec.DCT Methods
Summary
The forward discrete cosine transform (DCT).

Class
TVec

Declaration
Function DCT(Vec: TVec): TVec;

Description
Calculates the forward discrete cosine transform (DCT) of the Vec and writes the result in the calling vector. If Vec.Length is a power of 2, the function uses an efficient algorithm that is significantly faster than the direct computation of DCT. For other values of Vec Length, this function uses the direct formulas.
Declaration
Function DCT: TVec;

Description
Calculates the forward discrete cosine transform (DCT) of all calling vector elements in-place. If vector Length is a power of 2, the function uses an efficient algorithm that is significantly faster than the direct computation of DCT. For different lengths this function uses the direct formulas given below; however, the symmetry of cosine function is taken into account, which allows to perform about half of the multiplication operations in the formulas. In the following definition of DCT, N=Vec.Length and V is the calling vector:

 See Also 
IDCT 
IDCT 
FFT 
TDenseMtxVec.IDCT 
TDenseMtxVec.IDCT 
TDenseMtxVec.FFT 

Example 1

var a,b: TVec; begin CreateIt(a,b); a.SetIt(False,[1,-2,3,4]); b.DCT(a); FreeIt(a,b); end;

Copyright 2008 Dew Research
http://www.dewresearch.com