adjacency_matrix
adjacency_matrix(F)
Computes the sparse adjacency matrix from a face list or a list of edges.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
F |
(m,k) triangle or edge list.
|
If k=2, this is assumed to be an edge list; if k=3, this is assumed to be a triangle list of a triangle mesh. |
required |
Returns:
Name | Type | Description |
---|---|---|
A |
(n,n) scipy csr sparse matrix.
|
sparse adjacenct matrix |
Examples:
V,F = gpy.read_mesh("mesh.obj")
A = gpy.adjacency_matrix(F)
Source code in src/gpytoolbox/adjacency_matrix.py
6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 |
|