Package cds.healpix

Interface NeighbourSelector

All Known Implementing Classes:
HealpixNested, HealpixNestedFast

public interface NeighbourSelector
In this interface methods, we do not used an EnumMap of CompassPoint.MainWind but a NeighbourList because: 1 - we want to avoid autoboxing (a map storing Long and not long). 2 - we want to transparently deal with cases in which there is no neighbour in a given direction.
Author:
F.-X. Pineau
  • Field Details

  • Method Details

    • neighbour

      long neighbour(long hash, CompassPoint.MainWind direction)
      The hash value of the neighbour of the cell of given hash, in the given deirection.
      Parameters:
      hash - ash value of the cell we are looking for the neighbour.
      direction - direction of the neighbour we are looking for.
      Returns:
      -1 if there is no neighbour in the given direction (hashes located at corners of base hases).
    • neighbours

      NeighbourList neighbours(long hash)
      Returns the list of the hash of the cells surrounding the cell defined by the given hash. The number of surrounding cells can be 8 (for all cells except the cells located at the corners of the 12 depth 0 cells), 7 (for the west and east corners of the polar caps, i.e. depth 0 cells number 0, 1, 2, 4, 8, 9, 10 and 11, or for the north and south corners of the equatorial regions, i.e. depth 0 cells number 4, 5, 6 and 7), or 6 for depth 0 pixels.
      Parameters:
      hash - hash value of the cell we are looking for the neighbours.
      Returns:
      the list of neighbours hashes
    • neighbours

      void neighbours(long hash, NeighbourList result)
      Equivalent of neighbours(long) but passing in argument the list object to be filled. WARNING: the content of the provided list is overwritten, and be sure the list is large enough (at least of size 8). And the value -1 is returned if the given hash has no neighbour at the given main wind direction.
      Parameters:
      hash - the hash code we want the neighbours
      result - which contains the list of neighbours from index 0 to the number of neighbours
    • neighbours

      void neighbours(long hash, FlatHashList result)
      Idem as neighbours(long, NeighbourList) except that the result is put in a simple FlatHashList. WARNING: the content of the provided list is overwritten, and be sure the list is large enough (at least of size 8).
      Parameters:
      hash - the hash code we want the neighbours
      result - which contains the list of neighbours from index 0 to the number of neighbours
    • neighbours

      NeighbourList neighbours(long hash, EnumSet<CompassPoint.MainWind> directions)
      Equivalent of neighbours(long, FlatHashList) but with the list of direction of the wanted neighbours.
      Parameters:
      hash - hash value of the cell we are looking for the neighbours.
      directions - the directions of the neighbours we are looking for.
      Returns:
      the list of the hash of the neighbours of the cell having the given hash.
    • neighbours

      void neighbours(long hash, EnumSet<CompassPoint.MainWind> directions, NeighbourList result)
      Equivalent of neighbours(long, FlatHashList) but with the list of direction of the wanted neighbours. And the value -1 is returned if the given hash has no neighbour at the given main wind direction.
      Parameters:
      hash - hash value of the cell we are looking for the neighbours.
      directions - the directions of the neighbours we are looking for.
      result - the list holding the result.
    • internalEdges

      FlatHashList internalEdges(long hash, int deltaDepth)
    • internalEdges

      void internalEdges(long hash, int deltaDepth, FlatHashList result)
    • sortedInternalEdges

      FlatHashList sortedInternalEdges(long hash, int deltaDepth)
    • sortedInternalEdges

      void sortedInternalEdges(long hash, int deltaDepth, FlatHashList result)
    • sortedInternalEdge

      FlatHashList sortedInternalEdge(long hash, int deltaDepth, CompassPoint.Ordinal direction)
    • sortedInternalEdge

      void sortedInternalEdge(long hash, int deltaDepth, CompassPoint.Ordinal direction, FlatHashList result)
    • sortedInternalEdgeNE

      FlatHashList sortedInternalEdgeNE(long hash, int deltaDepth)
    • sortedInternalEdgeNE

      void sortedInternalEdgeNE(long hash, int deltaDepth, FlatHashList result)
    • sortedInternalEdgeNW

      FlatHashList sortedInternalEdgeNW(long hash, int deltaDepth)
    • sortedInternalEdgeNW

      void sortedInternalEdgeNW(long hash, int deltaDepth, FlatHashList result)
    • sortedInternalEdgeSE

      FlatHashList sortedInternalEdgeSE(long hash, int deltaDepth)
    • sortedInternalEdgeSE

      void sortedInternalEdgeSE(long hash, int deltaDepth, FlatHashList result)
    • sortedInternalEdgeSW

      FlatHashList sortedInternalEdgeSW(long hash, int deltaDepth)
    • sortedInternalEdgeSW

      void sortedInternalEdgeSW(long hash, int deltaDepth, FlatHashList result)
    • internalCorner

      long internalCorner(long hash, int deltaDepth, CompassPoint.Cardinal direction)
    • internalCornerN

      long internalCornerN(long hash, int deltaDepth)
    • internalCornerS

      long internalCornerS(long hash, int deltaDepth)
    • internalCornerE

      long internalCornerE(long hash, int deltaDepth)
    • internalCornerW

      long internalCornerW(long hash, int deltaDepth)
    • externalEdges

      FlatHashList externalEdges(long hash, int deltaDepth)
    • externalEdges

      void externalEdges(long hash, int deltaDepth, FlatHashList result)
    • sortedExternalEdges

      FlatHashList sortedExternalEdges(long hash, int deltaDepth)
    • sortedExternalEdges

      void sortedExternalEdges(long hash, int deltaDepth, FlatHashList result)