Class RdKNNTreeHeader
- java.lang.Object
-
- elki.persistent.DefaultPageHeader
-
- elki.index.tree.TreeIndexHeader
-
- elki.index.tree.spatial.rstarvariants.rdknn.RdKNNTreeHeader
-
- All Implemented Interfaces:
PageHeader
class RdKNNTreeHeader extends TreeIndexHeader
Encapsulates the header information of a RDkNN-Tree. This information is needed for persistent storage.- Since:
- 0.1
- Author:
- Elke Achtert
-
-
Constructor Summary
Constructors Constructor Description RdKNNTreeHeader()
Empty constructor for serialization.RdKNNTreeHeader(int pageSize, int dirCapacity, int leafCapacity, int dirMinimum, int leafMinimum, int k_max)
Creates a new header with the specified parameters.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
readHeader(java.nio.ByteBuffer buffer)
Initializes this header from the specified file.int
size()
ReturnsTreeIndexHeader.size()
plus the value ofSIZE
).void
writeHeader(java.nio.ByteBuffer buffer)
Writes this header to the specified file.-
Methods inherited from class elki.index.tree.TreeIndexHeader
getDirCapacity, getDirMinimum, getEmptyPagesSize, getLargestPageID, getLeafCapacity, getLeafMinimum, readEmptyPages, setEmptyPagesSize, setLargestPageID, writeEmptyPages
-
Methods inherited from class elki.persistent.DefaultPageHeader
getPageSize, getReservedPages
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface elki.persistent.PageHeader
readHeader, writeHeader
-
-
-
-
Field Detail
-
SIZE
private static int SIZE
The size of this header in Bytes, which is 4 Bytes (fork_max
).
-
k_max
int k_max
The maximum number k of reverse kNN queries to be supported.
-
-
Constructor Detail
-
RdKNNTreeHeader
public RdKNNTreeHeader()
Empty constructor for serialization.
-
RdKNNTreeHeader
public RdKNNTreeHeader(int pageSize, int dirCapacity, int leafCapacity, int dirMinimum, int leafMinimum, int k_max)
Creates a new header with the specified parameters.- Parameters:
pageSize
- the size of a page in bytesdirCapacity
- the maximum number of entries in a directory nodeleafCapacity
- the maximum number of entries in a leaf nodedirMinimum
- the minimum number of entries in a directory nodeleafMinimum
- the minimum number of entries in a leaf nodek_max
- the maximum number k of reverse kNN queries to be supported
-
-
Method Detail
-
readHeader
public void readHeader(java.nio.ByteBuffer buffer)
Initializes this header from the specified file. CallsTreeIndexHeader#readHeader(file)
and reads additionally the integer value ofk_max
from the file.- Specified by:
readHeader
in interfacePageHeader
- Overrides:
readHeader
in classTreeIndexHeader
- Parameters:
buffer
- byte array with the page data.
-
writeHeader
public void writeHeader(java.nio.ByteBuffer buffer)
Writes this header to the specified file. CallsPageHeader.writeHeader(FileChannel)
and writes additionally the integer value ofk_max
to the file.- Specified by:
writeHeader
in interfacePageHeader
- Overrides:
writeHeader
in classTreeIndexHeader
- Parameters:
buffer
- Buffer to write to
-
size
public int size()
ReturnsTreeIndexHeader.size()
plus the value ofSIZE
).- Specified by:
size
in interfacePageHeader
- Overrides:
size
in classTreeIndexHeader
- Returns:
- the size of this header in Bytes
-
-