jTree: Junction tree

Description Usage Arguments Details Value Author(s) Examples

View source: R/functions.r

Description

Finds a junction tree.

Usage

1
jTree(model)

Arguments

model

object of gRapHD class.

Details

Returns one possible junction tree. Note that each edge is associated to one separator in the list, and a separator may be contained in other(s) separator(s). To identify which separator is associated to each edge is enough to check ind<-indSepOrig[which(indSepOrig!=1)]. In this way, the edge juncTree[i,] is associated with separator ind[i].

Value

A list with:

separators

list with unique minimal separators.

juncTree

edges in the tree (each vertex is a clique in the list below).

sepSubSetOfSep

list in which each element gives all the separators which contain this respective separator.

indSepOrig

index of the original separator (in the MCS result) in the list above.

cliques

list with cliques.

Author(s)

Gabriel Coelho Goncalves de Abreu (abreu_ga@yahoo.com.br)

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
edges <- matrix(c(1,2,2,3,2,4,2,5,2,6,3,4,4,
                  5,5,6,7,8,7,9,8,9,8,10,9,10),ncol=2,byrow=TRUE)
m <- new("gRapHD",edges=edges)
jT <- jTree(m)
str(jT)
# List of 5
#  $ separators    :List of 5
#   ..$ : int(0)
#   ..$ : int 2
#   ..$ : int [1:2] 2 4
#   ..$ : int [1:2] 2 5
#   ..$ : int [1:2] 8 9
#  $ juncTree      : int [1:4, 1:2] 1 2 3 5 2 3 4 6
#  $ sepSubSetOfSep:List of 5
#   ..$ : int [1:4] 2 3 4 5
#   ..$ : int [1:2] 3 4
#   ..$ : int(0)
#   ..$ : int(0)
#   ..$ : int(0)
#  $ indSepOrig    : int [1:6] 1 2 3 4 1 5
#  $ cliques       :List of 6
#   ..$ : int [1:2] 1 2
#   ..$ : int [1:3] 2 3 4
#   ..$ : int [1:3] 2 4 5
#   ..$ : int [1:3] 2 5 6
#   ..$ : int [1:3] 7 8 9
#   ..$ : int [1:3] 8 9 10

gRapHD documentation built on Feb. 9, 2018, 6:05 a.m.

Related to jTree in gRapHD...