Package cds.healpix
Class NeighbourList
- java.lang.Object
-
- cds.healpix.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 Summary
Constructors Constructor Description NeighbourList(int depth)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidarraycopy(int srcPos, long[] dest, int destPos, int length)Similar toSystem.arraycopy(Object, int, Object, int, int)except that the source is the internal list.voidclear()booleancontains(CompassPoint.MainWind mainWind)longget(int i)Returns the element at the given indexiin the list.longget(CompassPoint.MainWind mainWind)CompassPoint.MainWindgetDirection(int i)FlatHashIteratoriterator()intsize()Returns the current number of elements in the flat list.voidsortByHashAsc()
-
-
-
Method Detail
-
clear
public void clear()
-
contains
public boolean contains(CompassPoint.MainWind mainWind)
-
get
public long get(CompassPoint.MainWind mainWind)
-
sortByHashAsc
public void sortByHashAsc()
-
size
public int size()
Description copied from interface:ListOfHashReturns the current number of elements in the flat list.- Specified by:
sizein interfaceListOfHash- Returns:
- the current number of elements in the flat list.
-
get
public long get(int i)
Description copied from interface:ListOfHashReturns the element at the given indexiin the list.- Specified by:
getin interfaceListOfHash- Parameters:
i- index in the list of the element to be returned.- Returns:
- the element at the given index
iin the list.
-
getDirection
public CompassPoint.MainWind getDirection(int i)
-
arraycopy
public void arraycopy(int srcPos, long[] dest, int destPos, int length)Description copied from interface:ListOfHashSimilar toSystem.arraycopy(Object, int, Object, int, int)except that the source is the internal list.- Specified by:
arraycopyin interfaceListOfHash- Parameters:
srcPos- seeSystem.arraycopy(Object, int, Object, int, int)dest- seeSystem.arraycopy(Object, int, Object, int, int)destPos- seeSystem.arraycopy(Object, int, Object, int, int)length- seeSystem.arraycopy(Object, int, Object, int, int)
-
iterator
public FlatHashIterator iterator()
- Specified by:
iteratorin interfaceFlatHashIterable
-
-