Package ucar.nc2.iosp.hdf5
Class Tiling
- java.lang.Object
-
- ucar.nc2.iosp.hdf5.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 Summary
Constructors Constructor Description Tiling(int[] shape, int[] chunk)
Create a Tiling
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
compare(int[] p1, int[] p2)
Create an ordering of index points based on which tile the point is in.int
order(int[] pt)
Get order based on which tile the pt belongs toint[]
tile(int[] pt)
Compute the tile
-
-
-
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 1p2
- index point 2- Returns:
- order(p1) - order(p2) : negative if p1 < p2, positive if p1 > p2 , 0 if equal
-
-