GraphAlgo-rip: RIP ordering and junction tree.

Description Usage Arguments Details Value Note Author(s) See Also Examples

Description

A RIP (running intersection property) ordering of the cliques is also called a perfect ordering. If the graph is not chordal, then no such ordering exists.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
rip(object, root = NULL, nLevels = NULL)
## S3 method for class 'graphNEL'
rip(object, root = NULL, nLevels = NULL)
## S3 method for class 'matrix'
rip(object, root = NULL, nLevels = NULL)
## S3 method for class 'Matrix'
rip(object, root = NULL, nLevels = NULL)
ripMAT(amat, root = NULL, nLevels = NULL) 

jTree(object, ...)
## S3 method for class 'graphNEL'
jTree(object, method="mcwh",nLevels=rep(2,length(nodes(object))),...)
## S3 method for class 'matrix'
jTree(object, method="mcwh",nLevels=rep(2,ncol(object)),...)
## S3 method for class 'Matrix'
jTree(object, method="mcwh",nLevels=rep(2,ncol(object)),...)

Arguments

object

An undirected graph represented either as a 'graphNEL', a 'matrix' or a sparse 'dgCMatrix'

root

A vector of variables. The first variable in the perfect ordering will be the first variable on 'root'. The ordering of the variables given in 'root' will be followed as far as possible.

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'.

amat

Adjacency matrix

method

The triangulation method, "mcwh" is a C implementation of a minimum clique weight heuristic, "R" is a corresponding R implementation (experimental)

...

Additional arguments; currently not used

Details

The RIP ordering is obtained by first ordering the variables linearly with maximum cardinality search (by mcs). The root argument is transfered to mcs as a way of controlling which clique will be the first in the RIP ordering.

The jTree (for "junction tree") is just a wrapper for a call of triangulate followed by a call of rip.

Value

rip returns a list (an object of class ripOrder. A print method exists for such objects.)

Note

The workhorse is the ripMAT function.

Author(s)

S<f8>ren H<f8>jsgaard, sorenh@math.aau.dk

See Also

mcs triangulate moralize ug, dag

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
## graphNEL
uG <- ug(~me+ve,~me+al,~ve+al,~al+an,~al+st,~an+st)
rip(uG)

## adjacency matrix
uG <- ug(~me+ve,~me+al,~ve+al,~al+an,~al+st,~an+st, result="matrix")
rip(uG)

## Sparse matrix
uG <- ug(~me+ve,~me+al,~ve+al,~al+an,~al+st,~an+st, result="Matrix")
rip(uG)

gRbase documentation built on May 2, 2019, 4:51 p.m.