public interface NeighbourSelector
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.Modifier and Type | Field and Description |
---|---|
static java.util.EnumSet<CompassPoint.MainWind> |
ALL_MAIN_WINDS |
Modifier and Type | Method and Description |
---|---|
FlatHashList |
externalEdges(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) |
FlatHashList |
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.
|
NeighbourList |
neighbours(long hash)
Returns the list of the hash of the cells surrounding the cell defined
by the given hash.
|
NeighbourList |
neighbours(long hash,
java.util.EnumSet<CompassPoint.MainWind> directions)
Equivalent of
neighbours(long, FlatHashList) but with the list of direction of the
wanted neighbours. |
void |
neighbours(long hash,
java.util.EnumSet<CompassPoint.MainWind> directions,
NeighbourList result)
Equivalent of
neighbours(long, FlatHashList) but with the list of direction of the
wanted neighbours. |
void |
neighbours(long hash,
FlatHashList result)
Idem as
neighbours(long, NeighbourList) except that the result is put in a
simple FlatHashList . |
void |
neighbours(long hash,
NeighbourList result)
Equivalent of
neighbours(long) but passing in argument the
list object to be filled. |
FlatHashList |
sortedExternalEdges(long hash,
int deltaDepth) |
void |
sortedExternalEdges(long hash,
int deltaDepth,
FlatHashList result) |
FlatHashList |
sortedInternalEdge(long hash,
int deltaDepth,
CompassPoint.Ordinal direction) |
void |
sortedInternalEdge(long hash,
int deltaDepth,
CompassPoint.Ordinal direction,
FlatHashList result) |
FlatHashList |
sortedInternalEdgeNE(long hash,
int deltaDepth) |
void |
sortedInternalEdgeNE(long hash,
int deltaDepth,
FlatHashList result) |
FlatHashList |
sortedInternalEdgeNW(long hash,
int deltaDepth) |
void |
sortedInternalEdgeNW(long hash,
int deltaDepth,
FlatHashList result) |
FlatHashList |
sortedInternalEdges(long hash,
int deltaDepth) |
void |
sortedInternalEdges(long hash,
int deltaDepth,
FlatHashList result) |
FlatHashList |
sortedInternalEdgeSE(long hash,
int deltaDepth) |
void |
sortedInternalEdgeSE(long hash,
int deltaDepth,
FlatHashList result) |
FlatHashList |
sortedInternalEdgeSW(long hash,
int deltaDepth) |
void |
sortedInternalEdgeSW(long hash,
int deltaDepth,
FlatHashList result) |
static final java.util.EnumSet<CompassPoint.MainWind> ALL_MAIN_WINDS
long neighbour(long hash, CompassPoint.MainWind direction)
hash
- ash value of the cell we are looking for the neighbour.direction
- direction of the neighbour we are looking for.NeighbourList neighbours(long hash)
hash
- hash value of the cell we are looking for the neighbours.void neighbours(long hash, NeighbourList result)
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.hash
- the hash code we want the neighboursresult
- which contains the list of neighbours from index 0 to the number of neighboursvoid neighbours(long hash, FlatHashList result)
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).hash
- the hash code we want the neighboursresult
- which contains the list of neighbours from index 0 to the number of neighboursNeighbourList neighbours(long hash, java.util.EnumSet<CompassPoint.MainWind> directions)
neighbours(long, FlatHashList)
but with the list of direction of the
wanted neighbours.hash
- hash value of the cell we are looking for the neighbours.directions
- the directions of the neighbours we are looking for.void neighbours(long hash, java.util.EnumSet<CompassPoint.MainWind> directions, NeighbourList result)
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.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.FlatHashList internalEdges(long hash, int deltaDepth)
void internalEdges(long hash, int deltaDepth, FlatHashList result)
FlatHashList sortedInternalEdges(long hash, int deltaDepth)
void sortedInternalEdges(long hash, int deltaDepth, FlatHashList result)
FlatHashList sortedInternalEdge(long hash, int deltaDepth, CompassPoint.Ordinal direction)
void sortedInternalEdge(long hash, int deltaDepth, CompassPoint.Ordinal direction, FlatHashList result)
FlatHashList sortedInternalEdgeNE(long hash, int deltaDepth)
void sortedInternalEdgeNE(long hash, int deltaDepth, FlatHashList result)
FlatHashList sortedInternalEdgeNW(long hash, int deltaDepth)
void sortedInternalEdgeNW(long hash, int deltaDepth, FlatHashList result)
FlatHashList sortedInternalEdgeSE(long hash, int deltaDepth)
void sortedInternalEdgeSE(long hash, int deltaDepth, FlatHashList result)
FlatHashList sortedInternalEdgeSW(long hash, int deltaDepth)
void sortedInternalEdgeSW(long hash, int deltaDepth, FlatHashList result)
long internalCorner(long hash, int deltaDepth, CompassPoint.Cardinal direction)
long internalCornerN(long hash, int deltaDepth)
long internalCornerS(long hash, int deltaDepth)
long internalCornerE(long hash, int deltaDepth)
long internalCornerW(long hash, int deltaDepth)
FlatHashList externalEdges(long hash, int deltaDepth)
void externalEdges(long hash, int deltaDepth, FlatHashList result)
FlatHashList sortedExternalEdges(long hash, int deltaDepth)
void sortedExternalEdges(long hash, int deltaDepth, FlatHashList result)
Copyright © 2018 F.-X. Pineau, CDS, Observatoire Astronomique de Strasbourg, Universite de Strasbourg, CNRS. All Rights Reserved.