|
Cytoscape 2.8.0 API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface SpacialIndex2D
A spacial index for objects in two dimensions.
Method Summary | |
---|---|
boolean |
exists(int objKey,
float[] extentsArr,
int offset)
Determines whether or not a given entry exists and conditionally retrieves the extents of that entry. |
SpacialEntry2DEnumerator |
queryOverlap(float xMin,
float yMin,
float xMax,
float yMax,
float[] extentsArr,
int offset,
boolean reverse)
Returns an enumeration of entries whose extents intersect the specified axis-aligned rectangular area. |
int |
size()
Returns the number of entries (objKeys) currently in this structure. |
Method Detail |
---|
int size()
NOTE: To retrieve an enumeration of all entries in this structure, call queryOverlap() with Float.NEGATIVE_INFINITY minimum values and Float.POSITIVE_INFINITY maximum values.
boolean exists(int objKey, float[] extentsArr, int offset)
array index value if objKey exists offset xMin of MBR offset+1 yMin of MBR offset+2 xMax of MBR offset+3 yMax of MBR
objKey
- the entry to query.extentsArr
- an array to which extent values will be written by this
method; may be null.offset
- specifies the beginning index of where to write extent
values into extentsArr; exactly four entries are written starting at
this index (see above table); if extentsArr is null then this offset
is ignored.
ArrayIndexOutOfBoundsException
- if objKey exists, if
extentsArr is not null, and if extentsArr cannot be written
to in the index range [offset, offset+3].SpacialEntry2DEnumerator queryOverlap(float xMin, float yMin, float xMax, float yMax, float[] extentsArr, int offset, boolean reverse)
The parameter extentsArr is written into by this method if it is not null. It provides a way for this method to communicate additional information to the caller of this method. If not null, extentsArr is populated with information regarding the minimum bounding rectangle (MBR) that contains all returned entries. The following table describes what is written to extentsArr if it is not null:
array index value if query generates results value if query does not generate results offset xMin of MBR Float.POSITIVE_INFINITY offset+1 yMin of MBR Float.POSITIVE_INFINITY offset+2 xMax of MBR Float.NEGATIVE_INFINITY offset+3 yMax of MBR Float.NEGATIVE_INFINITY
Note that the order of query results, as returned in the enumeration, may be completely random as a function of the query rectangle. However, any two subsequent, identical queries should produce an identical result order, provided that this structure does not undergo modification between those two queries (by modification I mean the possibility of entry shift, deletion of an entry, or insertion of an entry).
xMin
- the minimum X coordinate of the query rectangle.yMin
- the minimum Y coordinate of the query rectangle.xMax
- the maximum X coordinate of the query rectangle.yMax
- the maximum Y coordinate of the query rectangle.extentsArr
- an array to which
extent values will be written by this method; may be null.offset
- specifies the beginning index of where to write extent
values into extentsArr; exactly four entries are written starting at
this index (see table above); if extentsArr is null then this offset
is ignored.reverse
- if true, the order in which the query hits
are returned is reversed.
IllegalArgumentException
- if xMin is not less than or equal to
xMax or if yMin is not less than or equal to yMax.
ArrayIndexOutOfBoundsException
- if extentsArr is not null
and if it cannot be written to in the index range
[offset, offset+3].
|
Cytoscape 2.8.0 API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |