public class MkTreeHeader extends TreeIndexHeader
AbstractMkTreeUnified
.
This information is needed for persistent storage.Modifier and Type | Field and Description |
---|---|
private int |
k_max
The maximum number k of reverse kNN queries to be supported.
|
private static int |
SIZE
The size of this header in Bytes,
which is 4 Bytes (for
k_max ). |
Constructor and Description |
---|
MkTreeHeader()
Empty constructor for serialization.
|
MkTreeHeader(int pageSize,
int dirCapacity,
int leafCapacity,
int k_max)
Creates a nerw header with the specified parameters.
|
Modifier and Type | Method and Description |
---|---|
int |
getK_max()
Returns the parameter k.
|
void |
readHeader(RandomAccessFile file)
Initializes this header from the specified file.
|
int |
size()
Returns
TreeIndexHeader.size()
plus the value of SIZE ). |
void |
writeHeader(RandomAccessFile file)
Writes this header to the specified file.
|
getDirCapacity, getDirMinimum, getEmptyPagesSize, getLargestPageID, getLeafCapacity, getLeafMinimum, readEmptyPages, setEmptyPagesSize, setLargestPageID, writeEmptyPages
asByteArray, getPageSize, getReservedPages, readHeader
private static int SIZE
k_max
).private int k_max
public MkTreeHeader()
public MkTreeHeader(int pageSize, int dirCapacity, int leafCapacity, int k_max)
pageSize
- the size of a page in bytesdirCapacity
- the capacity of a directory nodeleafCapacity
- the capacity of a leaf nodek_max
- the parameter kpublic void readHeader(RandomAccessFile file) throws IOException
TreeIndexHeader#readHeader(file)
and reads additionally the integer value of
k_max
from the file.readHeader
in interface PageHeader
readHeader
in class TreeIndexHeader
file
- the file to which this header belongsIOException
- if an I/O-error occurs during readingpublic void writeHeader(RandomAccessFile file) throws IOException
TreeIndexHeader.writeHeader(java.io.RandomAccessFile)
and writes additionally the integer value of
k_max
to the file.writeHeader
in interface PageHeader
writeHeader
in class TreeIndexHeader
file
- the file to which this header belongsIOException
- IOException if an I/O-error occurs during writingpublic int getK_max()
public int size()
TreeIndexHeader.size()
plus the value of SIZE
).size
in interface PageHeader
size
in class TreeIndexHeader
Copyright © 2015 ELKI Development Team, Lehr- und Forschungseinheit für Datenbanksysteme, Ludwig-Maximilians-Universität München. License information.