Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ dfct_apply(3dxml) — Extended Math Library 3.4

Media Vault

Software Library

Restoration Projects

Artifacts Sought

SFCT_APPLY(3dxml)  —  Subroutines

Name

sfct_apply, dfct_apply − Application step for fast cosine transform in one dimension

FORMAT

status = {S,D}FCT_APPLY (direction, in, out, fct_struct, stride)

Arguments

directioncharacter∗(∗)
Specifies the operation as either the forward or inverse transform. Use Use ’B’ or

in, outreal∗4 | real∗8
Both the arguments are one-dimensional arrays.  The input and output arrays can be the same array. The IN array contains the data to be transformed. The OUT array contains the transformed data.

fct_structrecord /dxml_s_fct_structure/ for single-precision operations
record /dxml_d_fct_structure/ for double-precision operations

strideinteger∗4
Specifies the distance between consecutive elements in the input and output arrays, depending on the value of stride_1_flag provided in the _INIT function. 

Description

The _FCT_APPLY functions compute the fast Cosine transform of one-dimensional data in three steps. 

Return Values

0DXML_SUCCESS()

12DXML_INS_RES()

13DXML_BAD_STRIDE()

15DXML_BAD_DIRECTION_STRING()

17DXML_OPTION_NOT_SUPPORTED()

Example

INTEGER∗4 N
PARAMETER (N=1024)
INCLUDE ’{file_location}DXMLDEF.FOR’
INTEGER∗4 STATUS
RECORD /DXML_S_FCT_STRUCTURE/ D_FCT_STRUCT
RECORD /DXML_D_FCT_STRUCTURE/ D_FCT_STRUCT
REAL∗8 C(0:N),D(0:N)
REAL∗4 E(0:N-1),F(0:N-1)
STATUS = DFCT_INIT(N,D_FCT_STRUCT,1,.TRUE.)
STATUS = DFCT_APPLY(’F’,C,D,D_FCT_STRUCT,1)
STATUS = DFCT_APPLY(’B’,D,C,D_FCT_STRUCT,1)
STATUS = DFCT_EXIT(D_FCT_STRUCT)
STATUS = SFCT_INIT(N,S_FCT_STRUCT,2,.TRUE.)
STATUS = SFCT_APPLY(’F’,E,F,S_FCT_STRUCT,1)
STATUS = SFCT_APPLY(’B’,F,E,S_FCT_STRUCT,1)
STATUS = SFCT_EXIT(D_FCT_STRUCT)

This FORTRAN code computes the following:

•Forward Type-1 Cosine transform of the real sequence C to real sequence D. 

•Backward Type-1 Cosine transform of the real sequence D to real sequence C. 

•Forward Type-2 Cosine transform of the real sequence E to real sequence F. 

•Backward Type-2 Cosine transform of the real sequence F to real sequence E. 

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026