Environment for
DeveLoping
KDD-Applications
Supported by Index-Structures

de.lmu.ifi.dbs.elki.index.tree.metrical.mtreevariants.mkmax
Class MkMaxTreeHeader

java.lang.Object
  extended by de.lmu.ifi.dbs.elki.persistent.DefaultPageHeader
      extended by de.lmu.ifi.dbs.elki.index.tree.TreeIndexHeader
          extended by de.lmu.ifi.dbs.elki.index.tree.metrical.mtreevariants.mkmax.MkMaxTreeHeader
All Implemented Interfaces:
PageHeader

public class MkMaxTreeHeader
extends TreeIndexHeader

Encapsulates the header information of a MkNN-Tree. This information is needed for persistent storage.

Author:
Elke Achtert

Field Summary
(package private)  int k
          The parameter k.
private static int SIZE
          The size of this header.
 
Constructor Summary
MkMaxTreeHeader()
          Empty constructor for serialization.
MkMaxTreeHeader(int pageSize, int dirCapacity, int leafCapacity, int k)
          Creates a nerw header with the specified parameters.
 
Method Summary
 int getK()
          Returns the parameter k.
 void readHeader(RandomAccessFile file)
          Initializes this header from the specified file,
 int size()
          Returns the size of this header in Bytes.
 void writeHeader(RandomAccessFile file)
          Writes this header to the specified file,
 
Methods inherited from class de.lmu.ifi.dbs.elki.index.tree.TreeIndexHeader
getDirCapacity, getDirMinimum, getLeafCapacity, getLeafMinimum
 
Methods inherited from class de.lmu.ifi.dbs.elki.persistent.DefaultPageHeader
getPageSize
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

SIZE

private static int SIZE
The size of this header.


k

int k
The parameter k.

Constructor Detail

MkMaxTreeHeader

public MkMaxTreeHeader()
Empty constructor for serialization.


MkMaxTreeHeader

public MkMaxTreeHeader(int pageSize,
                       int dirCapacity,
                       int leafCapacity,
                       int k)
Creates a nerw header with the specified parameters.

Parameters:
pageSize - the size of a page in bytes
dirCapacity - the capacity of a directory node
leafCapacity - the capacity of a leaf node
k - the parameter k
Method Detail

readHeader

public void readHeader(RandomAccessFile file)
                throws IOException
Initializes this header from the specified file,

Specified by:
readHeader in interface PageHeader
Overrides:
readHeader in class TreeIndexHeader
Parameters:
file - the file to which this header belongs
Throws:
IOException

writeHeader

public void writeHeader(RandomAccessFile file)
                 throws IOException
Writes this header to the specified file,

Specified by:
writeHeader in interface PageHeader
Overrides:
writeHeader in class TreeIndexHeader
Parameters:
file - the file to which this header belongs
Throws:
IOException

getK

public int getK()
Returns the parameter k.

Returns:
the parameter k

size

public int size()
Returns the size of this header in Bytes.

Specified by:
size in interface PageHeader
Overrides:
size in class TreeIndexHeader
Returns:
the size of this header in Bytes

Release 0.1 (2008-07-10_1838)