public class SpatialDirectoryEntry extends java.lang.Object implements DirectoryEntry, SpatialEntry
Modifier and Type | Field and Description |
---|---|
private int |
id
Holds the id of the object (node or data object) represented by this entry.
|
private ModifiableHyperBoundingBox |
mbr
The minimum bounding rectangle of the underlying spatial node.
|
private static long |
serialVersionUID
Serialization version.
|
Constructor and Description |
---|
SpatialDirectoryEntry()
Empty constructor for serialization purposes.
|
SpatialDirectoryEntry(int id,
ModifiableHyperBoundingBox mbr)
Constructs a new SpatialDirectoryEntry object with the given parameters.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object o) |
boolean |
extendMBR(SpatialComparable responsibleMBR)
Extend the MBR of this node.
|
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.
|
int |
getPageID()
Get the page ID of this leaf entry.
|
int |
hashCode() |
boolean |
hasMBR()
Test whether this entry already has an MBR.
|
void |
readExternal(java.io.ObjectInput in)
Calls the super method and reads the MBR object of this entry from the
specified input stream.
|
void |
setMBR(ModifiableHyperBoundingBox mbr)
Sets the MBR of this entry.
|
java.lang.String |
toString() |
void |
writeExternal(java.io.ObjectOutput out)
Calls the super method and writes the MBR object of this entry to the
specified output stream.
|
private static final long serialVersionUID
private int id
private ModifiableHyperBoundingBox mbr
public SpatialDirectoryEntry()
public SpatialDirectoryEntry(int id, ModifiableHyperBoundingBox mbr)
id
- the unique id of the underlying spatial nodembr
- the minimum bounding rectangle of the underlying spatial nodepublic int getPageID()
DirectoryEntry
getPageID
in interface DirectoryEntry
public int getDimensionality()
SpatialComparable
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 boolean hasMBR()
public void setMBR(ModifiableHyperBoundingBox mbr)
mbr
- the MBR to be setpublic void writeExternal(java.io.ObjectOutput out) throws java.io.IOException
writeExternal
in interface java.io.Externalizable
out
- the stream to write the object tojava.io.IOException
- Includes any I/O exceptions that may occurpublic void readExternal(java.io.ObjectInput in) throws java.io.IOException, java.lang.ClassNotFoundException
readExternal
in interface java.io.Externalizable
in
- the stream to read data from in order to restore the objectjava.io.IOException
- if I/O errors occurjava.lang.ClassNotFoundException
- If the class for an object being restored
cannot be found.public boolean extendMBR(SpatialComparable responsibleMBR)
responsibleMBR
- public java.lang.String toString()
toString
in class java.lang.Object
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
Copyright © 2019 ELKI Development Team. License information.