
public class SpatialPointLeafEntry extends AbstractLeafEntry implements SpatialEntry
| Modifier and Type | Field and Description |
|---|---|
private static long |
serialVersionUID |
private double[] |
values
The values of the underlying data object.
|
| Constructor and Description |
|---|
SpatialPointLeafEntry()
Empty constructor for serialization purposes.
|
SpatialPointLeafEntry(DBID id,
double[] values)
Constructs a new LeafEntry object with the given parameters.
|
SpatialPointLeafEntry(DBID id,
NumberVector<?,?> vector)
Constructor from number vector
|
| Modifier and Type | Method and Description |
|---|---|
int |
getDimensionality()
Returns the dimensionality of the object.
|
double |
getMax(int dimension)
Returns the maximum coordinate at the specified dimension.
|
double |
getMin(int dimension)
Returns the minimum coordinate at the specified dimension.
|
double[] |
getValues()
Returns the values of the underlying data object of this entry.
|
void |
readExternal(ObjectInput in)
Calls the super method and reads the values of this entry from the
specified input stream.
|
void |
writeExternal(ObjectOutput out)
Calls the super method and writes the values of this entry to the specified
stream.
|
equals, getDBID, hashCode, isLeafEntry, toStringclone, finalize, getClass, notify, notifyAll, wait, wait, waitisLeafEntryprivate static final long serialVersionUID
private double[] values
public SpatialPointLeafEntry()
public SpatialPointLeafEntry(DBID id, double[] values)
id - the unique id of the underlying data objectvalues - the values of the underlying data objectpublic SpatialPointLeafEntry(DBID id, NumberVector<?,?> vector)
id - Object idvector - Number vectorpublic int getDimensionality()
SpatialComparablegetDimensionality in interface SpatialComparablepublic double getMin(int dimension)
SpatialComparablegetMin in interface SpatialComparabledimension - the dimension for which the coordinate should be returned,
where 1 ≤ dimension ≤ getDimensionality()public double getMax(int dimension)
SpatialComparablegetMax in interface SpatialComparabledimension - the dimension for which the coordinate should be returned,
where 1 ≤ dimension ≤ getDimensionality()public double[] getValues()
public void writeExternal(ObjectOutput out) throws IOException
writeExternal in interface ExternalizablewriteExternal in class AbstractLeafEntryout - the stream to write the object toIOException - Includes any I/O exceptions that may occurpublic void readExternal(ObjectInput in) throws IOException, ClassNotFoundException
readExternal in interface ExternalizablereadExternal in class AbstractLeafEntryin - the stream to read data from in order to restore the objectIOException - if I/O errors occurClassNotFoundException - If the class for an object being restored
cannot be found.