delaunay_adjacency¶
- delaunay_adjacency(points, dthresh)[source]¶
Create an adjacency matrix via Delaunay triangulation from a list of coordinates.
Points which are further apart than dthresh will not be connected.
See https://en.wikipedia.org/wiki/Adjacency_matrix.
- Parameters
coordinates (ArrayLike) – A nxm list of coordinates.
dthresh (int) – Distance threshold for triangulation.
points (ArrayLike) –
- Returns
- Adjacency matrix of shape NxN where 1 indicates
connected and 0 indicates unconnected.
- Return type
ArrayLike
Example
>>> points = np.random.rand(100, 2) >>> adjacency = delaunay_adjacency(points)