def global_propagation(self):
     self.joinTree.initialized = False
     # Arbitrarily pick a clique to be the root node, could be OPTIMIZED
     startClique = self.joinTree.nodes.pop()
     # Seems very awkward, but with sets there is no
     # way that I know of to get an element without popping it off.
     self.joinTree.nodes.add(startClique)
     GraphUtilities.unmark_all_nodes(self.joinTree)
     # We use 0 to denote that there was no prevCluster
     self.collect_evidence(0, startClique, 0, True)
     GraphUtilities.unmark_all_nodes(self.joinTree)
     self.distribute_evidence(startClique)
Exemple #2
0
 def global_propagation(self):
     self.joinTree.initialized = False
     # Arbitrarily pick a clique to be the root node, could be OPTIMIZED
     startClique = self.joinTree.nodes.pop()
     # Seems very awkward, but with sets there is no
     # way that I know of to get an element without popping it off.
     self.joinTree.nodes.add(startClique)
     GraphUtilities.unmark_all_nodes(self.joinTree)
     # We use 0 to denote that there was no prevCluster
     self.collect_evidence(0, startClique, 0, True)
     GraphUtilities.unmark_all_nodes(self.joinTree)
     self.distribute_evidence(startClique)