public class STRPartitioner extends Partitioner
Constructor and Description |
---|
STRPartitioner()
A default constructor to be able to dynamically instantiate it
and deserialize it
|
Modifier and Type | Method and Description |
---|---|
void |
createFromPoints(Rectangle mbr,
Point[] points,
int numPartitions)
Populate this partitioner for a set of points and number of partitions
|
CellInfo |
getPartition(int id)
Returns the details of a specific partition given its ID.
|
CellInfo |
getPartitionAt(int index)
Returns the detail of a partition given its position starting from zero
and ending at partitionCount() - 1
|
int |
getPartitionCount()
Returns total number of partitions
|
int |
overlapPartition(Shape shape)
Returns only one overlapping partition.
|
void |
overlapPartitions(Shape shape,
ResultCollector<java.lang.Integer> matcher)
Overlap a shape with partitions and calls a matcher for each overlapping
partition.
|
void |
readFields(java.io.DataInput in) |
void |
write(java.io.DataOutput out) |
getPartitioner, setPartitioner
public STRPartitioner()
public void createFromPoints(Rectangle mbr, Point[] points, int numPartitions)
Partitioner
createFromPoints
in class Partitioner
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 getPartitionCount()
Partitioner
getPartitionCount
in class Partitioner
public void overlapPartitions(Shape shape, ResultCollector<java.lang.Integer> matcher)
Partitioner
overlapPartitions
in class Partitioner
public int overlapPartition(Shape shape)
Partitioner
overlapPartition
in class Partitioner
public CellInfo getPartitionAt(int index)
Partitioner
getPartitionAt
in class Partitioner
public CellInfo getPartition(int id)
Partitioner
getPartition
in class Partitioner