gridfile.getLoadIndices

Organize the dimension indices required to implement a load operation


Syntax



Description

loadIndices = obj.getLoadIndices(userDimOrder, userIndices)

Takes a user-defined dimension order and accompanying dimension indices and determines the full set of indices needed for a load operation. The full set of indices includes indices for all gridfile dimensions in the order they appear in the gridfile.


Input Arguments

userDimOrder

vector, linear indices [nUserDims]
The locations of the user-requested output dimensions in the full set of gridfile dimensions.

userIndices

cell vector [nUserDims] {vector, linear indices | empty array}
The user-specified indices to load along each dimension.

Output Arguments

loadIndices

cell vector [nGridDims] {vector, linear indices}
The elements along each gridfile dimension that are required to implement the load operation. Includes all gridfile dimensions in the gridfile’s dimension order.