mpd {jti} | R Documentation |
Maximal Prime Decomposition
Description
Find the maximal prime decomposition and its associated junction tree
Usage
mpd(x, save_graph = TRUE)
## S3 method for class 'matrix'
mpd(x, save_graph = TRUE)
## S3 method for class 'cpt_list'
mpd(x, save_graph = TRUE)
Arguments
x |
Either a neighbor matrix or a |
save_graph |
Logical indicating if the moralized graph should be kept.
Useful when |
Value
- prime_ints
: a list with the prime components,
- flawed
: indicating which prime components that are triangulated
- jt_collect
: the MPD junction tree prepared for collecting
Examples
library(igraph)
el <- matrix(c(
"A", "T",
"T", "E",
"S", "L",
"S", "B",
"L", "E",
"E", "X",
"E", "D",
"B", "D"),
nc = 2,
byrow = TRUE
)
g <- igraph::graph_from_edgelist(el, directed = FALSE)
A <- igraph::as_adjacency_matrix(g, sparse = FALSE)
mpd(A)
[Package jti version 0.8.4 Index]