diff --git a/mesh/vertex_edge_adjacency.m b/mesh/vertex_edge_adjacency.m new file mode 100644 index 00000000..a64804b4 --- /dev/null +++ b/mesh/vertex_edge_adjacency.m @@ -0,0 +1,16 @@ +function VE = vertex_edge_adjacency(E) +%VERTEX_EDGE_ADJACENCY Build a vertex-edge adjacency matrix for a triangle +% mesh. +% +% Input: +% E #E x 2 list of edge indices +% Output: +% VE #E x #V sparse matrix, VE(i,j) is 1 iff vertex j is in edge i +% +% Example: +% [EF,EI,uE,EMAP] = edge_flaps(F); +% VE = vertex_edge_adjacency(uE); +i = (1:size(E,1))'; +j = E; +VE = sparse([i i],j,1); +end \ No newline at end of file diff --git a/mesh/vertex_triangle_adjacency.m b/mesh/vertex_triangle_adjacency.m index 3e8be23c..20acb345 100644 --- a/mesh/vertex_triangle_adjacency.m +++ b/mesh/vertex_triangle_adjacency.m @@ -7,7 +7,7 @@ % Input: % F #F x 3 list of face indices % Output: - % VT #F x #V sparse matrix, VT(i,j) is 1 iff vertex i is in face j + % VT #F x #V sparse matrix, VT(i,j) is 1 iff vertex j is in face i i = (1:size(F,1))'; j = F;