Package org.cytoscape.view.model.spacial
Interface EdgeSpacialIndex2DEnumerator
public interface EdgeSpacialIndex2DEnumerator
Enumerator returned when querying a
Example usage:
NetworkSpacialIndex2D
, used to iterate over the results of the query.
Example usage:
NetworkSpacialIndex2D spacialIndex = networkViewSnapshot.getSpacialIndex2D(); EdgeSpacialIndex2DEnumerator enumerator = spacialIndex.queryAllEdges(null); while(enumerator.hasNext()) { View<CyEdge> nodeView = enumerator.nextEdge(); }
- 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>
-
Method Summary
Modifier and TypeMethodDescriptionboolean
hasNext()
Returns true if this enumerator contains more edges.nextEdge()
Returns the next edge.nextEdgeWithNodeExtents
(float[] sourceExtents, float[] targetExtents, View<CyNode>[] nodes) Returns the next edge.int
size()
Number of edges in the enumerator.
-
Method Details
-
size
int size()Number of edges in the enumerator. -
hasNext
boolean hasNext()Returns true if this enumerator contains more edges. -
nextEdge
Returns the next edge. -
nextEdgeWithNodeExtents
View<CyEdge> nextEdgeWithNodeExtents(float[] sourceExtents, float[] targetExtents, View<CyNode>[] nodes) Returns the next edge.- Parameters:
sourceExtents
- Output parameter that will be loaded with the extents of the edge's source node. Must have size at least 4. May be null.targetExtents
- Output parameter that will be loaded with the extents of the edge's target node. Must have size at least 4. May be null.nodes
- Output parameter that will be loaded with the edge's source and target nodes. Must have size at least 2. May be null.- See Also:
-