Package cds.healpix

Interface HashComputer

  • All Superinterfaces:
    HierarchyItem
    All Known Implementing Classes:
    HealpixNested, HealpixNestedFast

    public interface HashComputer
    extends HierarchyItem
    Computing a hash value may implies objects creations. We define this interface in order to reuse objects inside an instance. It means that object implementing HashComputer are probably NOT THREAD-SAFE. So you MUST have one such implementation object per thread.
    Author:
    F.-X. Pineau
    • Method Detail

      • hash

        long hash​(double lonRad,
                  double latRad)
        Returns the HEALPix hash value of the given coordinate at this object depth. WARNING: depending on the implementation, this method may or may not be thread-safe.
        Parameters:
        lonRad - longitude in radians, must support reasonably large positive and negative values producing accurate results with a naive range reduction like modulo 2*pi (i.e. without having to resort on Cody-Waite or Payne Hanek range reduction).
        latRad - latitude in [-pi/2, pi/2] radians
        Returns:
        the hash value associated to the given coordinate, at this object depth.