code: public long[] lookup(int index) {
          if (exists[index]) {
              return indexes[index];
          } else {
              exists[index] = true;
              indexes[index] = ordering == 'c' ? Shape.ind2subC(shape, index, numIndexes)
                              : Shape.ind2sub(shape, index, numIndexes);
              return indexes[index];
          }
      }
docs: Give back a sub
  wrt the given linear index
  @param index the index
  @return the sub for the given index