Package cds.healpix.fillingcurve
Class ZOrderCurve3D
- java.lang.Object
-
- cds.healpix.fillingcurve.ZOrderCurve3D
-
- All Implemented Interfaces:
FillingCurve3D
public class ZOrderCurve3D extends java.lang.Object implements FillingCurve3D
Implementation of the 3d z-order curve based on lookup tables.- Author:
- F.-X. Pineau
-
-
Field Summary
Fields Modifier and Type Field Description static ZOrderCurve3D
INSTANCE
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description long
hash2i00(long hash)
Special case ofFillingCurve3D.hash2ijk(long)
in which the discretized coordinate along the vertical axis equals zero.long
hash2ijk(long hash)
Transforms the given space filling curve index (or hash value) into a single value from which it is straightforward to extract the associated 3d-coordinates using methodsFillingCurve3D.ijk2i(long)
,FillingCurve3D.ijk2j(long)
andFillingCurve3D.ijk2k(long)
.long
i002hash(int i)
Special case ofFillingCurve3D.ijk2hash(int, int, int)
in which the discretized coordinate along the vertical axis equals zero.long
ijk2hash(int i, int j, int k)
Transforms coordinates in a discretized 2d-space into a space filling curve index.int
ijk2i(long ijk)
Extract the discretized horizontal coordinates from the result of the methodFillingCurve3D.hash2ijk(long)
.int
ijk2j(long ijk)
Extract the discretized vertical coordinates from the result of the methodFillingCurve3D.hash2ijk(long)
.int
ijk2k(long ijk)
Extract the discretized depth coordinates from the result of the methodFillingCurve3D.hash2ijk(long)
.
-
-
-
Field Detail
-
INSTANCE
public static final ZOrderCurve3D INSTANCE
-
-
Method Detail
-
ijk2hash
public long ijk2hash(int i, int j, int k)
Description copied from interface:FillingCurve3D
Transforms coordinates in a discretized 2d-space into a space filling curve index. This can be thought of as computing a hash value from 3d-coordinates.- Specified by:
ijk2hash
in interfaceFillingCurve3D
- Parameters:
i
- discretized coordinate along the horizontal axisj
- discretized coordinate along the vertical axisk
- discretized coordinate along the depth axis- Returns:
- the space filling curve index (or hash value) associated to the given discretized 3d-coordinates.
-
i002hash
public long i002hash(int i)
Description copied from interface:FillingCurve3D
Special case ofFillingCurve3D.ijk2hash(int, int, int)
in which the discretized coordinate along the vertical axis equals zero.- Specified by:
i002hash
in interfaceFillingCurve3D
- Parameters:
i
- discretized coordinate along the horizontal axis- Returns:
- the space filling curve index (or hash value) associated to the given discretized horizontal coordinate, assuming the discretized vertical coordinate equal zero.
-
hash2ijk
public long hash2ijk(long hash)
Description copied from interface:FillingCurve3D
Transforms the given space filling curve index (or hash value) into a single value from which it is straightforward to extract the associated 3d-coordinates using methodsFillingCurve3D.ijk2i(long)
,FillingCurve3D.ijk2j(long)
andFillingCurve3D.ijk2k(long)
.- Specified by:
hash2ijk
in interfaceFillingCurve3D
- Parameters:
hash
- the space filling curve index (or hash value)- Returns:
- a single value from which it is straightforward to extract the associated
3d-coordinates using methods
FillingCurve3D.ijk2i(long)
,FillingCurve3D.ijk2j(long)
andFillingCurve3D.ijk2k(long)
.
-
hash2i00
public long hash2i00(long hash)
Description copied from interface:FillingCurve3D
Special case ofFillingCurve3D.hash2ijk(long)
in which the discretized coordinate along the vertical axis equals zero.- Specified by:
hash2i00
in interfaceFillingCurve3D
- Parameters:
hash
- the space filling curve index (or hash value)- Returns:
- a single value, knowing the vertical coordinate equals zero, from which it is
straightforward to extract the associated horizontal coordinate using method
FillingCurve3D.ijk2i(long)
.
-
ijk2i
public int ijk2i(long ijk)
Description copied from interface:FillingCurve3D
Extract the discretized horizontal coordinates from the result of the methodFillingCurve3D.hash2ijk(long)
.- Specified by:
ijk2i
in interfaceFillingCurve3D
- Parameters:
ijk
- result of the methodFillingCurve3D.hash2ijk(long)
- Returns:
- the discretized horizontal coordinate stored in the given parameter
ijk
-
ijk2j
public int ijk2j(long ijk)
Description copied from interface:FillingCurve3D
Extract the discretized vertical coordinates from the result of the methodFillingCurve3D.hash2ijk(long)
.- Specified by:
ijk2j
in interfaceFillingCurve3D
- Parameters:
ijk
- result of the methodFillingCurve3D.hash2ijk(long)
- Returns:
- the discretized horizontal coordinate stored in the given parameter
ijk
-
ijk2k
public int ijk2k(long ijk)
Description copied from interface:FillingCurve3D
Extract the discretized depth coordinates from the result of the methodFillingCurve3D.hash2ijk(long)
.- Specified by:
ijk2k
in interfaceFillingCurve3D
- Parameters:
ijk
- result of the methodFillingCurve3D.hash2ijk(long)
- Returns:
- the discretized horizontal coordinate stored in the given parameter
ijk
-
-