public class HyperBoundingBox extends java.lang.Object implements SpatialComparable, java.io.Externalizable
| Modifier and Type | Field and Description |
|---|---|
(package private) double[] |
max
The coordinates of the 'upper right' (= maximum) hyper point.
|
(package private) double[] |
min
The coordinates of the 'lower left' (= minimum) hyper point.
|
private static long |
serialVersionUID
Serial version.
|
| Constructor and Description |
|---|
HyperBoundingBox()
Empty constructor for Externalizable interface.
|
HyperBoundingBox(double[] min,
double[] max)
Creates a HyperBoundingBox for the given hyper points.
|
HyperBoundingBox(SpatialComparable other)
Constructor, cloning an existing spatial object.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(java.lang.Object obj) |
int |
getDimensionality()
Returns the dimensionality of this HyperBoundingBox.
|
double |
getMax(int dimension)
Returns the coordinate at the specified dimension of the maximum hyper
point.
|
double |
getMin(int dimension)
Returns the coordinate at the specified dimension of the minimum hyper
point.
|
int |
hashCode() |
void |
readExternal(java.io.ObjectInput in)
The object implements the readExternal method to restore its contents by
calling the methods of DataInput for primitive types and readObject for
objects, strings and arrays.
|
java.lang.String |
toString()
Returns a String representation of the HyperBoundingBox.
|
java.lang.String |
toString(java.lang.String pre,
java.text.NumberFormat nf)
Returns a String representation of the HyperBoundingBox.
|
void |
writeExternal(java.io.ObjectOutput out)
The object implements the writeExternal method to save its contents by
calling the methods of DataOutput for its primitive values or calling the
writeObject method of ObjectOutput for objects, strings, and arrays.
|
private static final long serialVersionUID
double[] min
double[] max
public HyperBoundingBox()
public HyperBoundingBox(double[] min,
double[] max)
min - - the coordinates of the minimum hyper pointmax - - the coordinates of the maximum hyper pointpublic HyperBoundingBox(SpatialComparable other)
other - Object to clonepublic double getMin(int dimension)
getMin in interface SpatialComparabledimension - the dimension for which the coordinate should be returned,
where 0 ≤ dimension < this.getDimensionality()public double getMax(int dimension)
getMax in interface SpatialComparabledimension - the dimension for which the coordinate should be returned,
where 0 ≤ dimension < this.getDimensionality()public int getDimensionality()
getDimensionality in interface SpatialComparablepublic java.lang.String toString()
toString in class java.lang.Objectpublic java.lang.String toString(java.lang.String pre,
java.text.NumberFormat nf)
nf - number format for output accuracypre - the prefix of each linepublic boolean equals(java.lang.Object obj)
equals in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Objectpublic void writeExternal(java.io.ObjectOutput out)
throws java.io.IOException
writeExternal in interface java.io.Externalizableout - 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
readExternal in interface java.io.Externalizablein - the stream to read data from in order to restore the objectjava.io.IOException - if I/O errors occurCopyright © 2019 ELKI Development Team. License information.