Class Tiling


  • public class Tiling
    extends Object
    A Tiling divides a multidimensional index into tiles. Abstraction of HDF5 chunking.

    Index are points in the original multidimensional index. Tiles are points in the tiled space.

    Each tile has the same size, given by tileSize.

    Since:
    Jul 20, 2007
    • Constructor Detail

      • Tiling

        public Tiling​(int[] shape,
                      int[] chunk)
        Create a Tiling
        Parameters:
        shape - overall shape of the dataset's index space
        chunk - tile size. may be larger than the shape.
    • Method Detail

      • tile

        public int[] tile​(int[] pt)
        Compute the tile
        Parameters:
        pt - index point
        Returns:
        corresponding tile
      • order

        public int order​(int[] pt)
        Get order based on which tile the pt belongs to
        Parameters:
        pt - index point
        Returns:
        order number based on which tile the pt belongs to
      • compare

        public int compare​(int[] p1,
                           int[] p2)
        Create an ordering of index points based on which tile the point is in.
        Parameters:
        p1 - index point 1
        p2 - index point 2
        Returns:
        order(p1) - order(p2) : negative if p1 < p2, positive if p1 > p2 , 0 if equal