Package cds.healpix
Class NeighbourList
java.lang.Object
cds.healpix.NeighbourList
- All Implemented Interfaces:
FlatHashIterable
,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 -
Method Summary
Modifier and TypeMethodDescriptionvoid
arraycopy
(int srcPos, long[] dest, int destPos, int length) Similar toSystem.arraycopy(Object, int, Object, int, int)
except that the source is the internal list.void
clear()
boolean
contains
(CompassPoint.MainWind mainWind) long
get
(int i) Returns the element at the given indexi
in the list.long
get
(CompassPoint.MainWind mainWind) getDirection
(int i) iterator()
int
size()
Returns the current number of elements in the flat list.void
-
Constructor Details
-
NeighbourList
public NeighbourList(int depth)
-
-
Method Details
-
clear
public void clear() -
contains
-
get
-
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 interfaceListOfHash
- 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 indexi
in the list.- Specified by:
get
in interfaceListOfHash
- Parameters:
i
- index in the list of the element to be returned.- Returns:
- the element at the given index
i
in the list.
-
getDirection
-
arraycopy
public void arraycopy(int srcPos, long[] dest, int destPos, int length) Description copied from interface:ListOfHash
Similar toSystem.arraycopy(Object, int, Object, int, int)
except that the source is the internal list.- Specified by:
arraycopy
in 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
- Specified by:
iterator
in interfaceFlatHashIterable
-