var_coord_dim_index, var_coord_dim, cooord_size, new_var_coords, coord_to_dim, xy_coord_dims - TDF dimension and coordinate functions

SYNOPSIS

#include <gp.h>

int var_coord_dim_index(var, coord)
VARP var;
int coord;

DIMP var_coord_dim(var, coord)
VARP var;
int coord;

int coord_size(set, coord)
SETP set;
int coord;

int new_var_coords(uvar, u, vvar, v)
VARP uvar;
double u[];
VARP vvar;
double v[];

double coord_to_dim(cval, dim)
double cval;
DIMP dim;

int xy_coord_dims(set, xdim, ydim)
SETP set;
DIMP *xdim, *ydim;

DESCRIPTION

The functions described here are utility functions for manipulating TDF dataset dimensions and the coordinate attributes associated with TDF dataset dimensions (datasets).

var_coord_dim_index returns for variable var, the index of the dimension with coordinate equal to coord.

var_coord_dim returns for variable var, the dimension with coordinate equal to coord.

coord_size returns for dataset set, the size of a dimension with coordinate equal to coord.

new_var_coords returns for variable vvar, the point v corresponding to point u for variable uvar, taking into account the different scales and offsets of the two variables dimensions (datasets).

coord_to_dim returns the dimension value (i.e. index under dimension attributes in datasets) translated from the coordinate value cval (i.e. orig index under dimension attributes in datasets) for dimension dim.

xy_coord_dims returns for dataset set, the dimensions xdim and ydim with coordinates GP_X_COORD and GP_Y_COORD, respectively.

RETURN VALUES

var_coord_dim_index returns -1 if no dimension has the given coordinate, otherwise the variable dimension index is returned.

var_coord_dim returns -1 if no dimension has the given coordinate, otherwise the variable dimension pointer is returned.

coord_size returns the size of the coordinate or 0 if no dimension has that coordinate.

new_var_coords returns 0 if successful and -1 if the translation could not be performed, such as in the case when the two variables have different dimensions.

coord_to_dim returns the coordinate value if the dimension scale attribute is 0 and returns the scaled value when the scale is nonzero.

xy_coord_dims returns 0 if successful or -1 if set does not have dimensions with coordinates GP_X_COORD and GP_Y_COORD.

FILES

include/gp.h, lib/libapp.a

SEE ALSO

gpatt, gpdim, gperr, gplink, gpname, gprel, gpset, gptype, gpvar, datasets


Last Update: $Date: 1999/05/10 20:56:29 $