jTree {gRapHD}R Documentation

Junction tree

Description

Finds a junction tree.

Usage

  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 (Gabriel.Abreu@agrsci.dk)
Rodrigo Labouriau (Rodrigo.Labouriau@agrsci.dk)
David Edwards (David.Edwards@agrsci.dk)

Examples

  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 <- as.gRapHD(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

[Package gRapHD version 0.1.0 Index]