C HDS Structures

 C.1 The TRN_TRANSFORM Structure
 C.2 The TRN_MODULE Structure
 C.3 The TRN_CLASS Structure

This Appendix describes the HDS structures used by the TRANSFORM facility.8 There are three of these, distinguished by their HDS type:

TYPE = TRN_TRANSFORM
structures are used to hold data defining a complete (possibly multi-stage) transformation and are handled directly by user-level TRANSFORM routines.
TYPE = TRN_MODULE
structures are used to hold transformation module information which represents a simple 1-stage transformation without associated classification information. These structures are not handled directly by user-level TRANSFORM routines.
TYPE = TRN_CLASS
structures are used to hold classification information about the properties of a transformation. These structures are also not handled directly by the user-level TRANSFORM routines.

The following Sections describe these structures in detail.

C.1 The TRN_TRANSFORM Structure

An HDS structure of type TRN_TRANSFORM contains the complete specification of a (possibly multi-stage) transformation with its associated classification information. It is defined as follows:

Components of a TRN_TRANSFORM Structure












Component Name HDS Type Typical Value Optional?




TRN_VERSION _REAL 0.9 no
FORWARD _CHAR DEFINED no
INVERSE _CHAR UNDEFINED no
MODULE_ARRAY() TRN_MODULE <array of structures > no
CLASSIFICATION TRN_CLASS <structure > yes




The structure components have the following meanings and restrictions:

TRN_VERSION
is a mandatory scalar _REAL component containing the version number of the TRANSFORM software which created or last modified the TRN_TRANSFORM structure or any of its components. This information allows programs linked with old versions of TRANSFORM software to detect if they are processing data structures created by more recent versions, with which they may not be compatible.
FORWARD
is a mandatory scalar _CHAR component which must contain one of the two values ‘DEFINED’ or ‘UNDEFINED’ (case insensitive). It specifies whether the transformation’s forward mapping is defined or undefined.
INVERSE
is a mandatory scalar _CHAR component which must contain one of the two values ‘DEFINED’ or ‘UNDEFINED’ (case insensitive). It specifies whether the transformation’s inverse mapping is defined or undefined. It is not permitted for both the FORWARD and INVERSE components to have the value ‘UNDEFINED’.
MODULE_ARRAY()
is a mandatory 1-dimensional array of structures of type TRN_MODULE. It holds a sequence of transformation modules which are to be used in succession to define the overall transformation. If the FORWARD component has the value ‘DEFINED’, then all the modules in this array must have their forward mappings defined. Similarly, if the INVERSE component has the value ‘DEFINED’, then all the modules must have their inverse mappings defined. Adjacent modules in this array must have matching numbers of output and input variables. The number of input variables for the transformation as a whole is determined by the number of input variables for the first module in this array, while the number of output variables is determined by the number of output variables for the final module.
CLASSIFICATION
is an optional scalar structure component of type TRN_CLASS. If present, it holds the classification information for the entire transformation. If absent, a default set of classification properties applies, which corresponds to all elements of the transformation’s logical classification array being set to .FALSE..

C.2 The TRN_MODULE Structure

A structure of type TRN_MODULE contains transformation module information, which represents the simplest form of 1-stage transformation without associated classification information. More complex transformations may be built up by joining several of these modules together, as is done in the MODULE_ARRAY component of a TRN_TRANSFORM structure. The TRN_MODULE structure is defined as follows:

Components of a TRN_MODULE Structure












Component Name HDS Type Typical Value Optional?




NVAR_IN _INTEGER 2 no
NVAR_OUT _INTEGER 2 no
COMMENT _CHAR 2-d Cartesian --> 2-d Polar yes
PRECISION _CHAR _REAL: no
FORWARD_FUNC() _CHAR R=SQRT(X*X+Y*Y)’,‘THETA=A... no
INVERSE_FUNC() _CHAR X=R*COS(THETA)’,‘Y=R*SIN(... no




The structure components have the following meanings and restrictions:

NVAR_IN
is a mandatory scalar _INTEGER component with a positive value specifying the number of input variables for the transformation which the module describes.
NVAR_OUT
is a mandatory scalar _INTEGER component with a positive value specifying the number of output variables for the transformation which the module describes.
COMMENT
is an optional scalar _CHAR component of arbitrary length which contains a comment associated with the transformation module. This comment should describe (in English) the type of transformation the module performs. The contents of the COMMENT component are only intended to be human-readable and should not be machine-processed, except that the special three-character sequences ‘-->’ and ‘<--’ (if present) may be automatically interchanged to reflect the effect of inverting the transformation module.
PRECISION
is a mandatory scalar _CHAR component of arbitrary length which contains a valid precision specification for the transformation module, according to the syntax described in Section 5.2.
FORWARD_FUNC()
is a mandatory 1-dimensional _CHAR array, with elements of arbitrary length, containing transformation functions which define the forward mapping (according to the syntax in Appendix A). The number of array elements must match the value stored in the NVAR_OUT component.
INVERSE_FUNC()
is a mandatory 1-dimensional _CHAR array, with elements of arbitrary length, containing transformation functions which define the inverse mapping (according to the syntax in Appendix A). The number of array elements must match the value stored in the NVAR_IN component.

C.3 The TRN_CLASS Structure

A structure of type TRN_CLASS contains information specifying the set of classification properties associated with a transformation. These properties are described in Appendix B. The TRN_CLASS structure is defined as follows:

Components of a TRN_CLASS Structure












Component Name HDS Type Typical Value Optional?




LINEAR _LOGICAL TRUE yes
INDEPENDENT _LOGICAL TRUE yes
DIAGONAL _LOGICAL TRUE yes
ISOTROPIC _LOGICAL FALSE yes
POSITIVE_DET _LOGICAL TRUE yes
NEGATIVE_DET _LOGICAL FALSE yes
CONSTANT_DET _LOGICAL TRUE yes
UNIT_DET _LOGICAL FALSE yes




All the structure components are scalar _LOGICAL objects, whose presence is optional. Their names correspond with the classification properties described in Appendix B and their logical values indicate whether the transformation has the associated property. If any component is absent, its value defaults to .FALSE.

8The data structures described here may be subject to change in future. However, apart from minor changes in the way data precision is handled, the current structures will continue to be supported by future versions of user-level TRANSFORM routines.