HeapPointWriter

class HeapPointWriter(config: BKDConfig, val size: Int) : PointWriter

Utility class to write new points into in-heap arrays.

Constructors

Link copied to clipboard
constructor(config: BKDConfig, size: Int)

Properties

Link copied to clipboard
val size: Int

Functions

Link copied to clipboard
open override fun append(pointValue: PointValue)

Add a new point from a PointValue

open override fun append(packedValue: ByteArray, docID: Int)

Add a new point from the packed value and docId

Link copied to clipboard
fun byteAt(i: Int, k: Int): Byte

Return the byte at position k of the point at position i

Link copied to clipboard
open override fun close()
Link copied to clipboard

Compares the data dimensions and doc values of the point at position i with the point at position j

fun compareDataDimsAndDoc(j: Int, dataDimsAndDocs: ByteArray, offset: Int): Int

Compares the data dimensions and doc values of the point at position j with the provided value

Link copied to clipboard
fun compareDim(i: Int, j: Int, dim: Int): Int

Compares the dimension dim value of the point at position i with the point at position j

fun compareDim(j: Int, dimValue: ByteArray, offset: Int, dim: Int): Int

Compares the dimension dim value of the point at position j with the provided value

Link copied to clipboard
fun computeCardinality(from: Int, to: Int, commonPrefixLengths: IntArray): Int

Computes the cardinality of the points between from tp to

Link copied to clipboard
fun copyDataDimsAndDoc(i: Int, bytes: ByteArray, offset: Int)

Copy the data dimensions and doc value of the point at position i in the provided bytes at the given offset

Link copied to clipboard
fun copyDim(i: Int, dim: Int, bytes: ByteArray, offset: Int)

Copy the dimension dim of the point at position i in the provided bytes at the given offset

Link copied to clipboard
open override fun count(): Long

Return the number of points in this writer

Link copied to clipboard
open override fun destroy()

Removes any temp files behind this writer

Link copied to clipboard

Returns a reference, in result, to the byte[] slice holding this value

Link copied to clipboard
open override fun getReader(start: Long, length: Long): PointReader

Returns a PointReader iterator to step through all previously added points

Link copied to clipboard
fun swap(i: Int, j: Int)

Swaps the point at point i with the point at position j

Link copied to clipboard
open override fun toString(): String