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 Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionexternalEdges
(long hash, int deltaDepth) void
externalEdges
(long hash, int deltaDepth, FlatHashList result) long
internalCorner
(long hash, int deltaDepth, CompassPoint.Cardinal direction) long
internalCornerE
(long hash, int deltaDepth) long
internalCornerN
(long hash, int deltaDepth) long
internalCornerS
(long hash, int deltaDepth) long
internalCornerW
(long hash, int deltaDepth) internalEdges
(long hash, int deltaDepth) void
internalEdges
(long hash, int deltaDepth, FlatHashList result) long
neighbour
(long hash, CompassPoint.MainWind direction) The hash value of the neighbour of the cell of given hash, in the given deirection.neighbours
(long hash) Returns the list of the hash of the cells surrounding the cell defined by the given hash.void
neighbours
(long hash, FlatHashList result) Idem asneighbours(long, NeighbourList)
except that the result is put in a simpleFlatHashList
.void
neighbours
(long hash, NeighbourList result) Equivalent ofneighbours(long)
but passing in argument the list object to be filled.neighbours
(long hash, EnumSet<CompassPoint.MainWind> directions) Equivalent ofneighbours(long, FlatHashList)
but with the list of direction of the wanted neighbours.void
neighbours
(long hash, EnumSet<CompassPoint.MainWind> directions, NeighbourList result) Equivalent ofneighbours(long, FlatHashList)
but with the list of direction of the wanted neighbours.sortedExternalEdges
(long hash, int deltaDepth) void
sortedExternalEdges
(long hash, int deltaDepth, FlatHashList result) sortedInternalEdge
(long hash, int deltaDepth, CompassPoint.Ordinal direction) void
sortedInternalEdge
(long hash, int deltaDepth, CompassPoint.Ordinal direction, FlatHashList result) sortedInternalEdgeNE
(long hash, int deltaDepth) void
sortedInternalEdgeNE
(long hash, int deltaDepth, FlatHashList result) sortedInternalEdgeNW
(long hash, int deltaDepth) void
sortedInternalEdgeNW
(long hash, int deltaDepth, FlatHashList result) sortedInternalEdges
(long hash, int deltaDepth) void
sortedInternalEdges
(long hash, int deltaDepth, FlatHashList result) sortedInternalEdgeSE
(long hash, int deltaDepth) void
sortedInternalEdgeSE
(long hash, int deltaDepth, FlatHashList result) sortedInternalEdgeSW
(long hash, int deltaDepth) void
sortedInternalEdgeSW
(long hash, int deltaDepth, FlatHashList result)
-
Field Details
-
ALL_MAIN_WINDS
-
-
Method Details
-
neighbour
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
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
Equivalent ofneighbours(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 neighboursresult
- which contains the list of neighbours from index 0 to the number of neighbours
-
neighbours
Idem asneighbours(long, NeighbourList)
except that the result is put in a simpleFlatHashList
. 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 neighboursresult
- which contains the list of neighbours from index 0 to the number of neighbours
-
neighbours
Equivalent ofneighbours(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
Equivalent ofneighbours(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
-
internalEdges
-
sortedInternalEdges
-
sortedInternalEdges
-
sortedInternalEdge
-
sortedInternalEdge
void sortedInternalEdge(long hash, int deltaDepth, CompassPoint.Ordinal direction, FlatHashList result) -
sortedInternalEdgeNE
-
sortedInternalEdgeNE
-
sortedInternalEdgeNW
-
sortedInternalEdgeNW
-
sortedInternalEdgeSE
-
sortedInternalEdgeSE
-
sortedInternalEdgeSW
-
sortedInternalEdgeSW
-
internalCorner
-
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
-
externalEdges
-
sortedExternalEdges
-
sortedExternalEdges
-