Description Usage Arguments Details Value Author(s) References Examples
Decide if a graph is triangulated
1 |
g |
an instance of the |
An undirected graph G = (V, E) is triangulated (i.e. chordal) if all cycles [v1, v2, ..., vk] of length 4 or more have a chord, i.e., an edge [vi, vj] with j != i +/- 1 (mod k)
An equivalent definition of chordal graphs is:
G is chordal iff either G is an empty graph, or there is an v in V such that
the neighborhood of v (i.e., v and its adjacent nodes) forms a clique, and
recursively, G-v is chordal
The return value is TRUE
if g
is triangulated and FALSE
otherwise. An error is thrown if the graph is not undirected; you might use
ugraph
to compute the underlying graph.
Li Long <li.long@isb-sib.ch>
Combinatorial Optimization: algorithms and complexity (p. 403) by C. H. Papadimitriou, K. Steiglitz
1 2 3 4 5 6 7 8 9 10 11 | con1 <- file(system.file("XML/conn.gxl",package="RBGL"), open="r")
coex <- fromGXL(con1)
close(con1)
is.triangulated(coex)
con2 <- file(system.file("XML/hcs.gxl",package="RBGL"), open="r")
coex <- fromGXL(con2)
close(con2)
is.triangulated(coex)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.