Package cds.healpix

Class NeighbourList

  • All Implemented Interfaces:
    FlatHashIterable, ListOfHash

    public final class NeighbourList
    extends java.lang.Object
    implements ListOfHash
    Class storing the hash values of the neighbour cells of a cell of given hash, together with the direction of each neighbour with respect to the central cell.
    Author:
    F.-X. Pineau
    • Constructor Detail

      • NeighbourList

        public NeighbourList​(int depth)
    • Method Detail

      • clear

        public void clear()
      • sortByHashAsc

        public void sortByHashAsc()
      • size

        public int size()
        Description copied from interface: ListOfHash
        Returns the current number of elements in the flat list.
        Specified by:
        size in interface ListOfHash
        Returns:
        the current number of elements in the flat list.
      • get

        public long get​(int i)
        Description copied from interface: ListOfHash
        Returns the element at the given index i in the list.
        Specified by:
        get in interface ListOfHash
        Parameters:
        i - index in the list of the element to be returned.
        Returns:
        the element at the given index i in the list.
      • arraycopy

        public void arraycopy​(int srcPos,
                              long[] dest,
                              int destPos,
                              int length)
        Description copied from interface: ListOfHash
        Similar to System.arraycopy(Object, int, Object, int, int) except that the source is the internal list.
        Specified by:
        arraycopy in interface ListOfHash
        Parameters:
        srcPos - see System.arraycopy(Object, int, Object, int, int)
        dest - see System.arraycopy(Object, int, Object, int, int)
        destPos - see System.arraycopy(Object, int, Object, int, int)
        length - see System.arraycopy(Object, int, Object, int, int)