NAME

cxLookupIndexV - interpolate into lattice index space at a vector of coordinate location #include <cx/Lookup.h>
int cxLookupIndexV(
  cxLookup lut,
  int n,
  float *loc,
  float *val)
integer function cxLookupIndexV(lut, n, loc, val)
integer lut
integer n
real loc(n)
real val(*, n)
lut
Input lookup table structure.
n
Input number of locations stored in vector loc.
loc
Input vector of the n point locations at which to look up data.
val
Output vector of lattice indices at n coordinate locations loc.
The return value for this function is an error code. Accepts the floating point coordinates of a vector of n points and returns their index-space coordinates.

The index space coordinates of a lattice are the zero-based array indices of the lattice's data array. For instance, a lattice of size 10 by 20 would have x indices ranging from 0 to 9 and y indices ranging from 0 to 19. On this lattice, cxLookupIndexV would return floating point fractional indices within these ranges. The index space coordinates indicate the point in the lattice whose interpolated coordinates would equal loc.

cxLookupIndexV requires that loc be an array of length n times nCoordVar, where each consecutive set of nCoordVar floats holds the location of one of the points to be looked up. The output vector val is an array of length n times nDim, where each consecutive set of nDim floats holds the location of the corresponding loc entry in index space.

The action of cxLookupIndexV is equivalent to n calls to cxLookupIndex, but is more efficient.

This function returns the number of domain errors encountered. A domain error occurs when the sample point lies outside the coordinate space of the lattice. For domains errors in uniform and perimeter lattices, the sample point is clamped to the lattice's index domain. For domains errors in curvilinear lattices, the returned indicess are set to negative one.

cxLookupCreate(3E), cxLookupIndex(3E), cxLookupInterpV(3E)
Last modified: Mon Nov 6 16:33:28 GMT 2000
[ Documentation Home ]
© The Numerical Algorithms Group Ltd, Oxford UK. 1996