Interface NodeSpacialIndex2DEnumerator

All Superinterfaces:
SpacialIndex2DEnumerator<Long>

public interface NodeSpacialIndex2DEnumerator extends SpacialIndex2DEnumerator<Long>
Enumerator returned when querying a NetworkSpacialIndex2D, used to iterate over the results of the query.

Example usage:
 NetworkSpacialIndex2D spacialIndex = networkViewSnapshot.getSpacialIndex2D();
 NodeSpacialIndex2DEnumerator enumerator = spacialIndex.queryAllNodes(null);
 float[] extents = new float[4];
 while(enumerator.hasNext()) {
     // extents will contain the coordinates of the bottom left and top right corners of the rectangle
     View<CyNode> nodeView = enumerator.nextNodeExtents(extents);
     float bottomLeftX = extents[SpacialIndex2D.X_MIN];
     float bottomLeftY = extents[SpacialIndex2D.Y_MIN];
     float topRightX = extents[SpacialIndex2D.X_MAX];
     float topRightY = extents[SpacialIndex2D.Y_MAX];
 }
 
Since:
3.9

Cytoscape Backwards Compatibility (SPI Interface): We expect that this interface will be implemented. Therefore to maintain backwards compatibility this interface will only be modified for major version updates.

Module: viewmodel-api

To use this in your app, include the following dependency in your POM:

<dependency>
    <groupId>org.cytoscape</groupId>
    <artifactId>viewmodel-api</artifactId>
</dependency>