# NOT RUN {
if(require(gRbase)){
## decomposable graph
ug.graph<-ug(~1:2:3+3:4+4:5:6:7)
ug.rip.all<-ripAllRootsClique(ug.graph)
# 7 variables
length(ug.rip.all$elements$variables)
# 3 max.cliques
length(ug.rip.all$elements$cliques)
# 7 unique components
nrow(ug.rip.all$elements$components)
# all rip orderings:
ug.rip.all$indices$ordering
## directed graph
dag.graph<-dag(~3:1+3:2+4:3)
dag.rip.all<-ripAllRootsClique(dag.graph)
# triangulated and morliazed graph
dag.rip.all$graph
# all rip orderings
dag.rip.all$indices$ordering
}
# }
Run the code above in your browser using DataLab