|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object de.lmu.ifi.dbs.elki.data.spatial.SpatialUtil
public final class SpatialUtil
Utility class with spatial functions.
Constructor Summary | |
---|---|
SpatialUtil()
|
Method Summary | |
---|---|
static double[] |
centroid(SpatialComparable obj)
Returns the centroid of this SpatialComparable. |
static double[] |
centroid(SpatialComparable obj,
int start,
int end)
Returns the centroid of the specified values of this SpatialComparable. |
static boolean |
contains(SpatialComparable box,
double[] point)
Returns true if this SpatialComparable contains the given point, false otherwise. |
static boolean |
contains(SpatialComparable box1,
SpatialComparable box2)
Returns true if the first SpatialComparable contains the second SpatialComparable, false otherwise. |
static boolean |
equals(SpatialComparable box1,
SpatialComparable box2)
Test two SpatialComparables for equality. |
static double[] |
getMax(SpatialComparable box)
Returns a clone of the maximum hyper point. |
static double[] |
getMin(SpatialComparable box)
Returns a clone of the minimum hyper point. |
static boolean |
intersects(SpatialComparable box1,
SpatialComparable box2)
Returns true if the two SpatialComparables intersect, false otherwise. |
static double |
perimeter(SpatialComparable box)
Computes the perimeter of this SpatialComparable. |
static double |
relativeOverlap(SpatialComparable box1,
SpatialComparable box2)
Computes the volume of the overlapping box between two SpatialComparables and return the relation between the volume of the overlapping box and the volume of both SpatialComparable. |
static HyperBoundingBox |
union(SpatialComparable box1,
SpatialComparable box2)
Computes the union HyperBoundingBox of two SpatialComparables. |
static HyperBoundingBox |
unionTolerant(SpatialComparable mbr1,
SpatialComparable mbr2)
Returns the union of the two specified MBRs. |
static double |
volume(SpatialComparable box)
Computes the volume of this SpatialComparable |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public SpatialUtil()
Method Detail |
---|
public static double[] getMin(SpatialComparable box)
public static double[] getMax(SpatialComparable box)
public static boolean intersects(SpatialComparable box1, SpatialComparable box2)
box1
- the first SpatialComparablebox2
- the first SpatialComparable
public static boolean contains(SpatialComparable box1, SpatialComparable box2)
box1
- the outer SpatialComparablebox2
- the inner SpatialComparable
public static boolean contains(SpatialComparable box, double[] point)
point
- the point to be tested for containment
public static double volume(SpatialComparable box)
public static double perimeter(SpatialComparable box)
public static double relativeOverlap(SpatialComparable box1, SpatialComparable box2)
box1
- the first SpatialComparablebox2
- the second SpatialComparable
public static HyperBoundingBox union(SpatialComparable box1, SpatialComparable box2)
box1
- the first SpatialComparablebox2
- the second SpatialComparable
public static HyperBoundingBox unionTolerant(SpatialComparable mbr1, SpatialComparable mbr2)
mbr1
- the first MBRmbr2
- the second MBR
public static double[] centroid(SpatialComparable obj)
obj
- Spatial object to process
public static double[] centroid(SpatialComparable obj, int start, int end)
obj
- Spatial object to processstart
- the start dimension to be consideredend
- the end dimension to be considered
public static boolean equals(SpatialComparable box1, SpatialComparable box2)
box1
- First bounding boxbox2
- Second bounding box
|
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |