Package org.gephi.graph.api
Interface SpatialIndex
-
public interface SpatialIndexObject to query the nodes and edges of the graph in a spatial context.- Author:
- Eduardo Ramos
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Rect2DgetBoundaries()Returns the bounding rectangle that contains all nodes in the graph.EdgeIterablegetEdgesInArea(Rect2D rect)Returns the edges in the given area.NodeIterablegetNodesInArea(Rect2D rect)Returns the nodes in the given area.
-
-
-
Method Detail
-
getNodesInArea
NodeIterable getNodesInArea(Rect2D rect)
Returns the nodes in the given area.- Parameters:
rect- area to query- Returns:
- nodes in the area
-
getEdgesInArea
EdgeIterable getEdgesInArea(Rect2D rect)
Returns the edges in the given area.- Parameters:
rect- area to query- Returns:
- edges in the area
-
getBoundaries
Rect2D getBoundaries()
Returns the bounding rectangle that contains all nodes in the graph. The boundaries are calculated based on each node's position and size.- Returns:
- the bounding rectangle, or null if there are no nodes
-
-