gabriel_graph

Contents

gabriel_graph#

graph_tool.generation.gabriel_graph(points)[git][source]#

Return the Gabriel graph of a set of points.

Parameters:
pointstwo-dimensional array

Coordinates of the points, as rows, without duplicates.

Returns:
gGraph

The Gabriel graph.

posVertexPropertyMap

Positions of the vertices.

See also

beta_skeleton

\(\beta\)-skeletons

relative_neighborhood_graph

Relative neighborhood graph

Notes

In the Gabriel graph [gabriel-new-1969], two points are adjacent if no other point lies in the closed ball that has the segment between them as a diameter. It is connected, planar in two dimensions, contains the relative neighborhood graph and the euclidean minimum spanning tree, and is a subgraph of the Delaunay triangulation; it is the \(\beta\)-skeleton for \(\beta = 1\) (see beta_skeleton(), which describes the algorithm).

References

[gabriel-new-1969]

K. Ruben Gabriel and Robert R. Sokal, “A new statistical approach to geographic variation analysis”, Systematic Zoology 18, 259-278 (1969), DOI: 10.2307/2412323 [sci-hub, @tor]

Examples

>>> points = np.random.random((1000, 2))
>>> g, pos = gt.gabriel_graph(points)
>>> print(g.num_edges())
1888

A smaller instance is drawn as follows:

>>> points = np.random.random((200, 2))
>>> g, pos = gt.gabriel_graph(points)
>>> gt.graph_draw(g, pos=pos,
...               output="gabriel_graph-small.pdf")
<...>
../_images/gabriel_graph-small.png

Gabriel graph of 200 random points in the unit square.#