S
- public class GlobalIndex<S extends Shape>
extends java.lang.Object
implements java.lang.Iterable<S>
Modifier and Type | Field and Description |
---|---|
protected S[] |
shapes
All underlying shapes in no specific order
|
protected S |
stockShape
A stock instance of S used to deserialize objects from disk
|
Constructor and Description |
---|
GlobalIndex() |
Modifier and Type | Method and Description |
---|---|
void |
bulkLoad(S[] shapes) |
Rectangle |
getMBR()
Returns the minimal bounding rectangle of all objects in the index.
|
boolean |
isCompact()
Returns true if the partitions are compact (minimal) around its contents
|
boolean |
isReplicated() |
java.util.Iterator<S> |
iterator() |
int |
knn(double qx,
double qy,
int k,
ResultCollector2<S,java.lang.Double> output) |
int |
rangeQuery(Shape queryRange,
ResultCollector<S> output) |
void |
readFields(java.io.DataInput in) |
void |
setCompact(boolean compact) |
void |
setReplicated(boolean r) |
int |
size()
Number of objects stored in the index
|
static <S1 extends Shape,S2 extends Shape> |
spatialJoin(GlobalIndex<S1> s1,
GlobalIndex<S2> s2,
ResultCollector2<S1,S2> output) |
void |
write(java.io.DataOutput out) |
protected S extends Shape stockShape
public void bulkLoad(S[] shapes)
public void write(java.io.DataOutput out) throws java.io.IOException
java.io.IOException
public void readFields(java.io.DataInput in) throws java.io.IOException
java.io.IOException
public int rangeQuery(Shape queryRange, ResultCollector<S> output)
public static <S1 extends Shape,S2 extends Shape> int spatialJoin(GlobalIndex<S1> s1, GlobalIndex<S2> s2, ResultCollector2<S1,S2> output)
public java.util.Iterator<S> iterator()
public int size()
public Rectangle getMBR()
null
is returned.null
if emptypublic int knn(double qx, double qy, int k, ResultCollector2<S,java.lang.Double> output)
public boolean isCompact()
public void setCompact(boolean compact)
public void setReplicated(boolean r)
public boolean isReplicated()