Cytoscape 2.8.2 API

cytoscape.geom.spacial
Interface SpacialEntry2DEnumerator

All Superinterfaces:
IntEnumerator

public interface SpacialEntry2DEnumerator
extends IntEnumerator

An enumeration over a set of entries in a SpacialIndex2D structure. The purpose of this class above and beyond IntEnumerator (which it extends) is to efficiently provide minimum bounding rectangle information for each entry returned.


Method Summary
 int nextExtents(float[] extentsArr, int offset)
          Copies into the supplied array [starting at specified offset] the minimum bounding rectangle of the next entry, and returns that next entry.
 
Methods inherited from interface cytoscape.util.intr.IntEnumerator
nextInt, numRemaining
 

Method Detail

nextExtents

int nextExtents(float[] extentsArr,
                int offset)
Copies into the supplied array [starting at specified offset] the minimum bounding rectangle of the next entry, and returns that next entry. The behavior of this method is identical to nextInt() except that in addition to returning a value, extents information is returned as well. The information written into the supplied extentsArr parameter consists of the following:
array index information written
offset xMin of MBR
offset+1 yMin of MBR
offset+2 xMax of MBR
offset+3 yMax of MBR

NOTE: If the retrieval of minimum bounding rectangle information for an entry is not important to the user of this enumeration, it is preferable to call nextInt() instead of nextExtents() for performance reasons.

Parameters:
extentsArr - an array to which extent values will be written by this method; cannot 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).
Returns:
the next entry (objKey) in the enumeration.
Throws:
ArrayIndexOutOfBoundsException - if extentsArr cannot be written to in the index range [offset, offset+3].

Cytoscape 2.8.2 API

Copyright 2010 Cytoscape Consortium. All rights reserved.