### AST_POLYMAP

Create a PolyMap

#### Description:

This function creates a new PolyMap and optionally initialises its attributes.

A PolyMap is a form of Mapping which performs a general polynomial transformation. Each output coordinate is a polynomial function of all the input coordinates. The coefficients are specified separately for each output coordinate. The forward and inverse transformations are defined independantly by separate sets of coefficients. If no inverse transformation is supplied, the default behaviour is to use an iterative method to evaluate the inverse based only on the forward transformation (see attribute IterInverse).

#### Invocation

RESULT = AST_POLYMAP( NIN, NOUT, NCOEFF_F, COEFF_F, NCOEFF_I, COEFF_I, OPTIONS, STATUS )

#### Arguments

##### NIN = INTEGER (Given)
The number of input coordinates.
##### NOUT = INTEGER (Given)
The number of output coordinates.
##### NCOEFF_F = INTEGER (Given)
The number of non-zero coefficients necessary to define the forward transformation of the PolyMap. If zero is supplied, the forward transformation will be undefined.
##### COEFF_F( $\ast$ ) = DOUBLE PRECISION (Given)
An array containing " NCOEFF_F$\ast$( 2 $+$ NIN )" elements. Each group of " 2 $+$ NIN" adjacent elements describe a single coefficient of the forward transformation. Within each such group, the first element is the coefficient value; the next element is the integer index of the PolyMap output which uses the coefficient within its defining polynomial (the first output has index 1); the remaining elements of the group give the integer powers to use with each input coordinate value (powers must not be negative, and floating point values are rounded to the nearest integer).

For instance, if the PolyMap has 3 inputs and 2 outputs, each group consisting of 5 elements, A groups such as " (1.2, 2.0, 1.0, 3.0, 0.0)" describes a coefficient with value 1.2 which is used within the definition of output 2. The output value is incremented by the product of the coefficient value, the value of input coordinate 1 raised to the power 1, and the value of input coordinate 2 raised to the power 3. Input coordinate 3 is not used since its power is specified as zero. As another example, the group " (-1.0, 1.0, 0.0, 0.0, 0.0 )" describes adds a constant value -1.0 onto output 1 (it is a constant value since the power for every input axis is given as zero).

Each final output coordinate value is the sum of the " NCOEFF_F" terms described by the " NCOEFF_F" groups within the supplied array.

##### NCOEFF_I = INTEGER (Given)
The number of non-zero coefficients necessary to define the inverse transformation of the PolyMap. If zero is supplied, the default behaviour is to use an iterative method to evaluate the inverse based only on the forward transformation (see attribute IterInverse).
##### COEFF_I( $\ast$ ) = DOUBLE PRECISION (Given)
An array containing " NCOEFF_I$\ast$( 2 $+$ NOUT )" elements. Each group of " 2 $+$ NOUT" adjacent elements describe a single coefficient of the inverse transformation, using the same schame as " COEFF_F" , except that " inputs" and " outputs" are transposed.
##### OPTIONS = CHARACTER $\ast$ ( $\ast$ ) (Given)
A character string containing an optional comma-separated list of attribute assignments to be used for initialising the new PolyMap. The syntax used is identical to that for the AST_SET routine.
##### STATUS = INTEGER (Given and Returned)
The global status.

#### Returned Value

##### AST_POLYMAP = INTEGER
A pointer to the new PolyMap.

#### Notes:

• A null Object pointer (AST__NULL) will be returned if this function is invoked with STATUS set to an error value, or if it should fail for any reason.