powered by
Obtain patches of a graph by Rem's algorithm.
getPatches(bonds, nvertex)
a matrix of bonds in a graph, with one bond per row.
number of vertices in a graph.
A list comprises all patches in a graph. Each component of the list consists of vertices within one patch.
Given all bonds and the number of vertices in a graph, this function provides all patches.
Edsger W. Dijkstra (1976) A Discipline of Programming Englewood Cliffs, New Jersey : Prentice-Hall, Inc
# NOT RUN { #Example 1: Find patches of a 3*3 2D graph with 6 bonds. bonds <- matrix(c(1,2,2,5,5,6,3,6,5,8,7,8), ncol=2, byrow=TRUE) getPatches(bonds, 9) # }
Run the code above in your browser using DataLab