Package elki.index.tree.spatial
Class SpatialPointLeafEntry
- java.lang.Object
-
- elki.index.tree.spatial.SpatialPointLeafEntry
-
- All Implemented Interfaces:
elki.data.FeatureVector<java.lang.Number>,elki.data.NumberVector,elki.data.spatial.SpatialComparable,elki.index.tree.LeafEntry,SpatialEntry,java.io.Externalizable,java.io.Serializable
- Direct Known Subclasses:
DeLiCluLeafEntry,RdKNNLeafEntry
public class SpatialPointLeafEntry extends java.lang.Object implements elki.index.tree.LeafEntry, SpatialEntry, elki.data.NumberVector
Represents an entry in a leaf node of a spatial index. A SpatialLeafEntry consists of an id (representing the unique id of the underlying data object) and the values of the underlying data object.- Since:
- 0.1
- Author:
- Elke Achtert
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description private elki.database.ids.DBIDidHolds the id of the object (node or data object) represented by this entry.private static longserialVersionUIDSerial version.private double[]valuesThe values of the underlying data object.
-
Constructor Summary
Constructors Constructor Description SpatialPointLeafEntry()Empty constructor for serialization purposes.SpatialPointLeafEntry(elki.database.ids.DBID id, double[] values)Constructs a new LeafEntry object with the given parameters.SpatialPointLeafEntry(elki.database.ids.DBID id, elki.data.NumberVector vector)Constructor from number vector.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description doubledoubleValue(int dimension)booleanequals(java.lang.Object obj)elki.database.ids.DBIDgetDBID()intgetDimensionality()inthashCode()longlongValue(int dimension)voidreadExternal(java.io.ObjectInput in)Calls the super method and reads the values of this entry from the specified input stream.double[]toArray()voidwriteExternal(java.io.ObjectOutput out)Calls the super method and writes the values of this entry to the specified stream.
-
-
-
Field Detail
-
serialVersionUID
private static final long serialVersionUID
Serial version.- See Also:
- Constant Field Values
-
id
private elki.database.ids.DBID id
Holds the id of the object (node or data object) represented by this entry.
-
values
private double[] values
The values of the underlying data object.
-
-
Constructor Detail
-
SpatialPointLeafEntry
public SpatialPointLeafEntry()
Empty constructor for serialization purposes.
-
SpatialPointLeafEntry
public SpatialPointLeafEntry(elki.database.ids.DBID id, double[] values)Constructs a new LeafEntry object with the given parameters.- Parameters:
id- the unique id of the underlying data objectvalues- the values of the underlying data object
-
SpatialPointLeafEntry
public SpatialPointLeafEntry(elki.database.ids.DBID id, elki.data.NumberVector vector)Constructor from number vector.- Parameters:
id- Object idvector- Number vector
-
-
Method Detail
-
getDBID
public elki.database.ids.DBID getDBID()
- Specified by:
getDBIDin interfaceelki.index.tree.LeafEntry
-
getDimensionality
public int getDimensionality()
- Specified by:
getDimensionalityin interfaceelki.data.FeatureVector<java.lang.Number>- Specified by:
getDimensionalityin interfaceelki.data.spatial.SpatialComparable
-
writeExternal
public void writeExternal(java.io.ObjectOutput out) throws java.io.IOExceptionCalls the super method and writes the values of this entry to the specified stream.- Specified by:
writeExternalin interfacejava.io.Externalizable- Parameters:
out- the stream to write the object to- Throws:
java.io.IOException- Includes any I/O exceptions that may occur
-
readExternal
public void readExternal(java.io.ObjectInput in) throws java.io.IOException, java.lang.ClassNotFoundExceptionCalls the super method and reads the values of this entry from the specified input stream.- Specified by:
readExternalin interfacejava.io.Externalizable- Parameters:
in- the stream to read data from in order to restore the object- Throws:
java.io.IOException- if I/O errors occurjava.lang.ClassNotFoundException- If the class for an object being restored cannot be found.
-
doubleValue
public double doubleValue(int dimension)
- Specified by:
doubleValuein interfaceelki.data.NumberVector
-
longValue
public long longValue(int dimension)
- Specified by:
longValuein interfaceelki.data.NumberVector
-
toArray
public double[] toArray()
- Specified by:
toArrayin interfaceelki.data.NumberVector
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equalsin classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
-