getPatches {PottsUtils} | R Documentation |
Get Patches of a Graph
Description
Obtain patches of a graph by Rem's algorithm.
Usage
getPatches(bonds, nvertex)
Arguments
bonds |
a matrix of bonds in a graph, with one bond per row. |
nvertex |
number of vertices in a graph. |
Details
Given all bonds and the number of vertices in a graph, this function provides all patches.
Value
A list comprises all patches in a graph. Each component of the list consists of vertices within one patch.
References
Edsger W. Dijkstra (1976) A Discipline of Programming Englewood Cliffs, New Jersey : Prentice-Hall, Inc
Examples
#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)
[Package PottsUtils version 0.3-3 Index]