Class ImmutableFloatNode
- java.lang.Object
-
- org.apache.druid.collections.spatial.ImmutableFloatNode
-
- All Implemented Interfaces:
ImmutableNode<float[]>
- Direct Known Subclasses:
ImmutableFloatPoint
public class ImmutableFloatNode extends Object implements ImmutableNode<float[]>
Byte layout: Header 0 to 1 : the MSB is a boolean flag for isLeaf, the next 15 bits represent the number of children of a node Body 2 to 2 + numDims * Float.BYTES : minCoordinates 2 + numDims * Float.BYTES to 2 + 2 * numDims * Float.BYTES : maxCoordinates concise set rest (children) : Every 4 bytes is storing an offset representing the position of a child. The child offset is an offset from the initialOffset
-
-
Field Summary
Fields Modifier and Type Field Description static intHEADER_NUM_BYTES
-
Constructor Summary
Constructors Constructor Description ImmutableFloatNode(int numDims, int initialOffset, int offsetFromInitial, short numChildren, boolean leaf, ByteBuffer data, BitmapFactory bitmapFactory)ImmutableFloatNode(int numDims, int initialOffset, int offsetFromInitial, ByteBuffer data, BitmapFactory bitmapFactory)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description BitmapFactorygetBitmapFactory()Iterable<ImmutableNode<float[]>>getChildren()ByteBuffergetData()ImmutableBitmapgetImmutableBitmap()intgetInitialOffset()float[]getMaxCoordinates()float[]getMinCoordinates()intgetNumDims()intgetOffsetFromInitial()booleanisLeaf()
-
-
-
Field Detail
-
HEADER_NUM_BYTES
public static final int HEADER_NUM_BYTES
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
ImmutableFloatNode
public ImmutableFloatNode(int numDims, int initialOffset, int offsetFromInitial, ByteBuffer data, BitmapFactory bitmapFactory)
-
ImmutableFloatNode
public ImmutableFloatNode(int numDims, int initialOffset, int offsetFromInitial, short numChildren, boolean leaf, ByteBuffer data, BitmapFactory bitmapFactory)
-
-
Method Detail
-
getBitmapFactory
public BitmapFactory getBitmapFactory()
- Specified by:
getBitmapFactoryin interfaceImmutableNode<float[]>
-
getInitialOffset
public int getInitialOffset()
- Specified by:
getInitialOffsetin interfaceImmutableNode<float[]>
-
getOffsetFromInitial
public int getOffsetFromInitial()
- Specified by:
getOffsetFromInitialin interfaceImmutableNode<float[]>
-
getNumDims
public int getNumDims()
- Specified by:
getNumDimsin interfaceImmutableNode<float[]>
-
isLeaf
public boolean isLeaf()
- Specified by:
isLeafin interfaceImmutableNode<float[]>
-
getMinCoordinates
public float[] getMinCoordinates()
- Specified by:
getMinCoordinatesin interfaceImmutableNode<float[]>
-
getMaxCoordinates
public float[] getMaxCoordinates()
- Specified by:
getMaxCoordinatesin interfaceImmutableNode<float[]>
-
getImmutableBitmap
public ImmutableBitmap getImmutableBitmap()
- Specified by:
getImmutableBitmapin interfaceImmutableNode<float[]>
-
getChildren
public Iterable<ImmutableNode<float[]>> getChildren()
- Specified by:
getChildrenin interfaceImmutableNode<float[]>
-
getData
public ByteBuffer getData()
- Specified by:
getDatain interfaceImmutableNode<float[]>
-
-