Learn R Programming

gRbase (version 1.3.9)

triangulate: Triangulation of an undirected graph

Description

This function will triangulate an undirected graph by adding fillins.

Usage

triangulate(object, ...)
## S3 method for class 'graphNEL':
triangulate(object, method="mcwh",  nLevels = rep(2,length(nodes(object))), matrix=FALSE,...)
triangulateMAT(amat, method="mcwh", nLevels=rep(2,ncol(amat)),...)

Arguments

object
An undirected graph (of class 'graphNEL')
amat
An adjacency matrix (symmetrical)
method
Triangulation method. Either "mcwh" (minimum clique weight heuristic) which is implemented in C or "r" (an experimental R version)
nLevels
Typically, the number of levels of the variables (nodes) when these are discrete. Used in determining the triangulation using a "minimum clique weight heuristic". See section 'details'.
matrix
If TRUE the adjacency matrix is returned; if FALSE a graphNEL object is returned
...
Additional arguments, currently not used.

Value

  • A triangulated graph (an object of class 'graphNEL') or an adjacency matrix.

Details

The triangulation is made so as the total state space is kept low.

See Also

mcs rip

Examples

Run this code
ugr <- ug(~a:b+b:c+c:d+d:e+e:f+f:a)
triangulate(ugr)

Run the code above in your browser using DataLab