triangulate {gRbase}R Documentation

Triangulation of an undirected graph

Description

This function will triangulate an undirected graph by adding fillins.

Usage

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

Details

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

Value

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

Author(s)

Søren Højsgaard, sorenh@agrsci.dk

See Also

mcs rip

Examples

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

[Package gRbase version 1.0.1 Index]