From 73438af7bbfc2632679284d544177c06d7f9d146 Mon Sep 17 00:00:00 2001 From: Waldir Leoncio Date: Thu, 22 Dec 2022 13:29:54 +0100 Subject: [PATCH] Removed translating TODOs Replaced with built-in TODO list in Issue #3's body --- R/findCliques.R | 6 +++--- R/triangulate.R | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/R/findCliques.R b/R/findCliques.R index ba0ec59..f413e64 100644 --- a/R/findCliques.R +++ b/R/findCliques.R @@ -3,10 +3,10 @@ findCliques <- function(M) { # separaattorit. # Hyצdynnetההn Kevin Murphyn algoritmeja Graph Theory toolboxista. # Pהivitetty 12.8.2005 - order <- elim_order(M, ones(length(M))) # TODO: translate from findCliques.m + order <- elim_order(M, ones(length(M))) G <- cliques <- root <- NULL - c(G, cliques) %<-% triangulate(M, order) # TODO: translate from findCliques.m - c(jtree, root) %<-% cliques_to_jtree(cliques, ones(length(M))) # TODO: translate from findCliques.m + c(G, cliques) %<-% triangulate(M, order) + c(jtree, root) %<-% cliques_to_jtree(cliques, ones(length(M))) ncliq <- length(cliques) separators <- cell(ncliq - 1, 1) # n - solmuisessa puussa n - 1 viivaa diff --git a/R/triangulate.R b/R/triangulate.R index 36d1410..47bb409 100644 --- a/R/triangulate.R +++ b/R/triangulate.R @@ -15,14 +15,14 @@ triangulate <- function(G, order) { u <- order[i] U <- find(!eliminated)# uneliminated nodes <- myintersect(neighbors(G, u), U)# look up neighbors in the partially filled - in graph - nodes <- myunion(nodes, u)# the clique will always contain at least u # TODO: translate myunion + nodes <- myunion(nodes, u)# the clique will always contain at least u G[nodes, nodes] <- 1# make them all connected to each other - G <- setdiag(G, 0) # TODO: translate setdiag + G <- setdiag(G, 0) eliminated[u] <- 1 exclude <- 0 for (c in 1:length(cliques)) { - if (mysubset(nodes, cliques[[c]])) { # not maximal) # TODO: translate mysubset + if (mysubset(nodes, cliques[[c]])) { # not maximal) exclude <- 1 break }