|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Objectorg.h2.mvstore.rtree.SpatialDataType
public class SpatialDataType
A spatial data type. This class supports up to 31 dimensions. Each dimension can have a minimum and a maximum value of type float. For each dimension, the maximum value is only stored when it is not the same as the minimum.
| Constructor Summary | |
|---|---|
SpatialDataType(int dimensions)
|
|
| Method Summary | |
|---|---|
int |
compare(java.lang.Object a,
java.lang.Object b)
Compare two keys. |
boolean |
contains(java.lang.Object objA,
java.lang.Object objB)
Check whether a contains b. |
boolean |
equals(java.lang.Object a,
java.lang.Object b)
Check whether two spatial values are equal. |
float |
getAreaIncrease(java.lang.Object objA,
java.lang.Object objB)
Get the area increase by extending a to contain b. |
int[] |
getExtremes(java.util.ArrayList<java.lang.Object> list)
Get the most extreme pair (elements that are as far apart as possible). |
int |
getMemory(java.lang.Object obj)
Estimate the used memory in bytes. |
void |
increaseBounds(java.lang.Object bounds,
java.lang.Object add)
Increase the bounds in the given spatial object. |
boolean |
isInside(java.lang.Object objA,
java.lang.Object objB)
Check whether a is completely inside b and does not touch the given bound. |
boolean |
isOverlap(java.lang.Object objA,
java.lang.Object objB)
Check whether the two objects overlap. |
java.lang.Object |
read(java.nio.ByteBuffer buff)
Read an object. |
void |
read(java.nio.ByteBuffer buff,
java.lang.Object[] obj,
int len,
boolean key)
Read a list of objects. |
void |
write(WriteBuffer buff,
java.lang.Object obj)
Write an object. |
void |
write(WriteBuffer buff,
java.lang.Object[] obj,
int len,
boolean key)
Write a list of objects. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public SpatialDataType(int dimensions)
| Method Detail |
|---|
public int compare(java.lang.Object a,
java.lang.Object b)
DataType
compare in interface DataTypea - the first keyb - the second key
public boolean equals(java.lang.Object a,
java.lang.Object b)
a - the first valueb - the second value
public int getMemory(java.lang.Object obj)
DataType
getMemory in interface DataTypeobj - the object
public void read(java.nio.ByteBuffer buff,
java.lang.Object[] obj,
int len,
boolean key)
DataType
read in interface DataTypebuff - the target bufferobj - the objectslen - the number of objects to readkey - whether the objects are keys
public void write(WriteBuffer buff,
java.lang.Object[] obj,
int len,
boolean key)
DataType
write in interface DataTypebuff - the target bufferobj - the objectslen - the number of objects to writekey - whether the objects are keys
public void write(WriteBuffer buff,
java.lang.Object obj)
DataType
write in interface DataTypebuff - the target bufferobj - the valuepublic java.lang.Object read(java.nio.ByteBuffer buff)
DataType
read in interface DataTypebuff - the source buffer
public boolean isOverlap(java.lang.Object objA,
java.lang.Object objB)
objA - the first objectobjB - the second object
public void increaseBounds(java.lang.Object bounds,
java.lang.Object add)
bounds - the bounds (may be modified)add - the value
public float getAreaIncrease(java.lang.Object objA,
java.lang.Object objB)
objA - the bounding boxobjB - the object
public boolean contains(java.lang.Object objA,
java.lang.Object objB)
objA - the bounding boxobjB - the object
public boolean isInside(java.lang.Object objA,
java.lang.Object objB)
objA - the object to checkobjB - the bounds
public int[] getExtremes(java.util.ArrayList<java.lang.Object> list)
list - the objects
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||