Class 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
    • Nested Class Summary

      • Nested classes/interfaces inherited from interface elki.data.NumberVector

        elki.data.NumberVector.Factory<V extends elki.data.NumberVector>
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private elki.database.ids.DBID id
      Holds the id of the object (node or data object) represented by this entry.
      private static long serialVersionUID
      Serial version.
      private double[] values
      The values of the underlying data object.
      • Fields inherited from interface elki.data.FeatureVector

        TYPE
      • Fields inherited from interface elki.data.NumberVector

        ATTRIBUTE_SEPARATOR, FIELD, FIELD_1D, FIELD_2D, VARIABLE_LENGTH
    • 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
      double doubleValue​(int dimension)  
      boolean equals​(java.lang.Object obj)  
      elki.database.ids.DBID getDBID()  
      int getDimensionality()  
      int hashCode()  
      long longValue​(int dimension)  
      void readExternal​(java.io.ObjectInput in)
      Calls the super method and reads the values of this entry from the specified input stream.
      double[] toArray()  
      void writeExternal​(java.io.ObjectOutput out)
      Calls the super method and writes the values of this entry to the specified stream.
      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
      • Methods inherited from interface elki.data.FeatureVector

        toString
      • Methods inherited from interface elki.data.NumberVector

        byteValue, floatValue, getMax, getMin, getValue, intValue, shortValue
    • 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 object
        values - 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 id
        vector - Number vector
    • Method Detail

      • getDBID

        public elki.database.ids.DBID getDBID()
        Specified by:
        getDBID in interface elki.index.tree.LeafEntry
      • getDimensionality

        public int getDimensionality()
        Specified by:
        getDimensionality in interface elki.data.FeatureVector<java.lang.Number>
        Specified by:
        getDimensionality in interface elki.data.spatial.SpatialComparable
      • writeExternal

        public void writeExternal​(java.io.ObjectOutput out)
                           throws java.io.IOException
        Calls the super method and writes the values of this entry to the specified stream.
        Specified by:
        writeExternal in interface java.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.ClassNotFoundException
        Calls the super method and reads the values of this entry from the specified input stream.
        Specified by:
        readExternal in interface java.io.Externalizable
        Parameters:
        in - the stream to read data from in order to restore the object
        Throws:
        java.io.IOException - if I/O errors occur
        java.lang.ClassNotFoundException - If the class for an object being restored cannot be found.
      • doubleValue

        public double doubleValue​(int dimension)
        Specified by:
        doubleValue in interface elki.data.NumberVector
      • longValue

        public long longValue​(int dimension)
        Specified by:
        longValue in interface elki.data.NumberVector
      • toArray

        public double[] toArray()
        Specified by:
        toArray in interface elki.data.NumberVector
      • equals

        public boolean equals​(java.lang.Object obj)
        Overrides:
        equals in class java.lang.Object
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object