|
|
|||||||||||||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectde.lmu.ifi.dbs.elki.utilities.heap.MinMaxHeap<K,V>
de.lmu.ifi.dbs.elki.utilities.heap.Deap<K,V>
class Deap<K extends Comparable<K> & Serializable,V extends Identifiable & Serializable>
Subclass of a MinMaxHeap that can be an entry in a persistent heap.
Field Summary | |
---|---|
private int |
cacheIndex
The index of this deap in the cachePath of the persistent heap. |
private boolean |
dirty
The dirty flag of this page. |
private int |
index
The index of this Deap in the persistent heap. |
private int |
maxSize
The maximum size of this deap. |
private static long |
serialVersionUID
|
Fields inherited from class de.lmu.ifi.dbs.elki.utilities.heap.MinMaxHeap |
---|
heap, indices |
Constructor Summary | |
---|---|
Deap()
Empty constructor for serialization purposes. |
|
Deap(int maxSize,
int index,
int cacheIndex)
Creates a new Deap with the specified parameters. |
Method Summary | |
---|---|
int |
getCacheIndex()
Returns the index of this deap in the cachePath of the persistent heap. |
Integer |
getID()
Returns the unique id of this Page. |
int |
getIndex()
Returns the index of this deap in the persistent heap. |
boolean |
isDirty()
Returns true if this page is dirty, false otherwise. |
boolean |
isFull()
Returns true if this deap is full, false otherwise. |
void |
moveAll(Deap<K,V> other)
Moves all elements from this deap into the specified deap. |
void |
readExternal(ObjectInput in)
The object implements the readExternal method to restore its contents by calling the methods of DataInput for primitive types and readObject for objects, strings and arrays. |
void |
setCacheIndex(int cacheIndex)
Sets the index of this deap in the cachePath of the persistent heap. |
void |
setDirty(boolean dirty)
Sets the dirty flag of this page. |
void |
setFile(PageFile<Deap<K,V>> file)
Sets the page file of this page. |
void |
setID(int id)
Sets the unique id of this Page. |
void |
writeExternal(ObjectOutput out)
The object implements the writeExternal method to save its contents by calling the methods of DataOutput for its primitive values or calling the writeObject method of ObjectOutput for objects, strings, and arrays. |
Methods inherited from class de.lmu.ifi.dbs.elki.utilities.heap.MinMaxHeap |
---|
addNode, flowUp, getIndexOf, getMaxNode, getMinNode, getNodeAt, isEmpty, maxNode, minNode, size, toString |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
private static final long serialVersionUID
private int index
private int cacheIndex
private int maxSize
private boolean dirty
Constructor Detail |
---|
public Deap()
public Deap(int maxSize, int index, int cacheIndex)
maxSize
- the maximum size of the deapindex
- the index of this deap in the persistent heapcacheIndex
- the index of this deap in the cachePath of the persistent heapMethod Detail |
---|
public int getCacheIndex()
public void setCacheIndex(int cacheIndex)
cacheIndex
- the cache index to be setpublic boolean isFull()
public void moveAll(Deap<K,V> other)
other
- the deap to move all elements topublic Integer getID()
getID
in interface Page<Deap<K extends Comparable<K> & Serializable,V extends Identifiable & Serializable>>
public void setID(int id)
setID
in interface Page<Deap<K extends Comparable<K> & Serializable,V extends Identifiable & Serializable>>
id
- the id to be setpublic void setFile(PageFile<Deap<K,V>> file)
setFile
in interface Page<Deap<K extends Comparable<K> & Serializable,V extends Identifiable & Serializable>>
file
- the page file to be setpublic boolean isDirty()
isDirty
in interface Page<Deap<K extends Comparable<K> & Serializable,V extends Identifiable & Serializable>>
public void setDirty(boolean dirty)
setDirty
in interface Page<Deap<K extends Comparable<K> & Serializable,V extends Identifiable & Serializable>>
dirty
- the dirty flag to be setpublic void writeExternal(ObjectOutput out) throws IOException
writeExternal
in interface Externalizable
out
- the stream to write the object to
IOException
- Includes any I/O exceptions that may occurpublic void readExternal(ObjectInput in) throws IOException, ClassNotFoundException
readExternal
in interface Externalizable
in
- the stream to read data from in order to restore the object
IOException
- if I/O errors occur
ClassNotFoundException
- If the class for an object being restored cannot be found.public int getIndex()
|
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |