DCT¶
-
class
DCT: public tsa::BaseFFT¶ Multichannel Discrete Cosine Transform.
Operations
-
void
operator()(SeqViewDouble &in, SeqViewDouble &out)¶ Apply the transformation on the data
- Return
a reference to this instance of the class
- Parameters
in: a reference to the buffer containing the input dataout: a reference to the buffer containing the input data
-
void
execute(Dmatrix &in, Dmatrix &out)¶ Execution of the fft of a multichannel buffer of double. Input data are organized in a matrix. Each row is a different channel, and the number of data to transform is equal to the number of columns. Both the number of rows and the number of columns can change between each call to this method. If the number of rows changes nothing special will happen, if the number of cols changes the plan is reevaluated with the current flags.
- Pre
The number of rows of input and output matrix must be the same.
- Pre
The columns of the output matrix must be int(n/2)+1, where n is the number of columns of the input matrix.
- Post
the input buffer is unchanged, unless SetPreserveInput(false) was called
- Post
the output buffer contain the fft of the input data
- Exceptions
bad_matrix_size: the size of the output matrix is wrong
- Parameters
in: reference to the input multichannel bufferout: reference to the output multichannel buffer
-
void
execute(Dvector &in, Dvector &out)¶ Execution of the fft of a single channel buffer of double. If the number of the buffer changes the plan is reevaluated with the current flags.
- Pre
The sized of the output vector must be int(n/2)+1, where n is the size of the input vector.
- Post
the input buffer is unchanged, unless SetPreserveInput(false) was called
- Post
the output buffer contain the fft of the input data
- Exceptions
bad_matrix_size: the size of the output matrix is wrong
- Parameters
in: reference to the input bufferout: reference to the output buffer
-
void
MakePlan()¶ Make a new plan, with the current parameters.
- Exceptions
std::runtime_error: The new plan cannot be created
Public Functions
-
DCT(int size = 0, enum FFTPlanningMode mode = ESTIMATE, bool PreserveInput = true)¶ Constructor
- Parameters
size: the size of the transformmode: specify the way in which plans are calculatedPreserveInput: true if the input buffer must be preserved during the transform, false otherwise
-
~DCT()¶ Destructor
-
void