Package com.google.common.geometry
Class S2CellIndex.Delta
java.lang.Object
com.google.common.geometry.S2CellIndex.Delta
- Enclosing class:
S2CellIndex
To build the cell tree and leaf cell ranges, we maintain a stack of (cellId, label) pairs that
contain the current leaf cell. This class represents an instruction to push or pop a (cellId,
label) pair.
If label >= 0, the (cellId, label) pair is pushed on the stack. If cellId == S2CellId.SENTINEL, a pair is popped from the stack. Otherwise the stack is unchanged but a RangeNode is still emitted.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Comparator
<S2CellIndex.Delta> Deltas are sorted first by startId, then in reverse order by cellId, and then by label.private final S2CellId
private final int
private final S2CellId
-
Constructor Summary
Constructors -
Method Summary
-
Field Details
-
BY_START_CELL_NEG_LABEL
Deltas are sorted first by startId, then in reverse order by cellId, and then by label. This is necessary to ensure that (1) larger cells are pushed on the stack before smaller cells, and (2) cells are popped off the stack before any new cells are added. -
startId
-
cellId
-
label
private final int label
-
-
Constructor Details
-
Delta
-