public class SpatialPointLeafEntry extends AbstractLeafEntry implements SpatialEntry, NumberVector
NumberVector.Factory<V extends NumberVector>
Modifier and Type | Field and Description |
---|---|
private static long |
serialVersionUID
Serial version.
|
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 |
---|---|
byte |
byteValue(int dimension)
Returns the value in the specified dimension as byte.
|
double |
doubleValue(int dimension)
Returns the value in the specified dimension as double.
|
float |
floatValue(int dimension)
Returns the value in the specified dimension as float.
|
Vector |
getColumnVector()
Returns a Vector representing in one column and
getDimensionality() rows the values of this NumberVector of V. |
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 |
getValue(int dimension)
Deprecated.
|
double[] |
getValues()
Returns the values of the underlying data object of this entry.
|
int |
intValue(int dimension)
Returns the value in the specified dimension as int.
|
long |
longValue(int dimension)
Returns the value in the specified dimension as long.
|
void |
readExternal(ObjectInput in)
Calls the super method and reads the values of this entry from the
specified input stream.
|
short |
shortValue(int dimension)
Returns the value in the specified dimension as short.
|
void |
writeExternal(ObjectOutput out)
Calls the super method and writes the values of this entry to the specified
stream.
|
equals, getDBID, hashCode, isLeafEntry, toString
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
isLeafEntry
toString
private 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()
SpatialComparable
getDimensionality
in interface FeatureVector<Number>
getDimensionality
in interface SpatialComparable
public double getMin(int dimension)
SpatialComparable
getMin
in interface SpatialComparable
dimension
- the dimension for which the coordinate should be returned,
where 0 ≤ dimension < getDimensionality()
public double getMax(int dimension)
SpatialComparable
getMax
in interface SpatialComparable
dimension
- the dimension for which the coordinate should be returned,
where 0 ≤ dimension < getDimensionality()
public double[] getValues()
public void writeExternal(ObjectOutput out) throws IOException
writeExternal
in interface Externalizable
writeExternal
in class AbstractLeafEntry
out
- 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 Externalizable
readExternal
in class AbstractLeafEntry
in
- 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.@Deprecated public Double getValue(int dimension)
FeatureVector
getValue
in interface FeatureVector<Number>
getValue
in interface NumberVector
dimension
- the desired dimension, where 0 ≤ dimension ≤
this.getDimensionality()-1
public double doubleValue(int dimension)
NumberVector
getValue(dim).doubleValue()
, but usually this is much more
efficient due to boxing/unboxing cost.doubleValue
in interface NumberVector
dimension
- the desired dimension, where 0 ≤ dimension <
this.getDimensionality()
public float floatValue(int dimension)
NumberVector
getValue(dim).floatValue()
, but usually this is much more efficient
due to boxing/unboxing cost.floatValue
in interface NumberVector
dimension
- the desired dimension, where 0 ≤ dimension <
this.getDimensionality()
public int intValue(int dimension)
NumberVector
getValue(dim).intValue()
, but usually this is much more efficient
due to boxing/unboxing cost.intValue
in interface NumberVector
dimension
- the desired dimension, where 0 ≤ dimension <
this.getDimensionality()
public long longValue(int dimension)
NumberVector
getValue(dim).longValue()
, but usually this is much more efficient
due to boxing/unboxing cost.longValue
in interface NumberVector
dimension
- the desired dimension, where 0 ≤ dimension <
this.getDimensionality()
public short shortValue(int dimension)
NumberVector
getValue(dim).shortValue()
, but usually this is much more efficient
due to boxing/unboxing cost.shortValue
in interface NumberVector
dimension
- the desired dimension, where 0 ≤ dimension <
this.getDimensionality()
public byte byteValue(int dimension)
NumberVector
getValue(dim).byteValue()
, but usually this is much more efficient
due to boxing/unboxing cost.byteValue
in interface NumberVector
dimension
- the desired dimension, where 0 ≤ dimension <
this.getDimensionality()
public Vector getColumnVector()
NumberVector
getDimensionality()
rows the values of this NumberVector of V.getColumnVector
in interface NumberVector
getDimensionality()
rows the values of this
NumberVector of VCopyright © 2015 ELKI Development Team, Lehr- und Forschungseinheit für Datenbanksysteme, Ludwig-Maximilians-Universität München. License information.