Exemplo n.º 1
0
 def sendMessageIndex(self, messageIndex):
     '''Sends the ith message to the marginal and returns the log-normalization constant'''
     Guard.argumentIsValidIndex(messageIndex, len(self._messages),
                                "messageIndex")
     message = self._messages[messageIndex]
     variable = self._messageToVariableBinding.getValue(message)
     return self.sendMessageVariable(message, variable)
Exemplo n.º 2
0
 def updateMessageIndex(self, messageIndex):
     '''Update the message and marginal of the i-th variable that the factor is connected to'''
     Guard.argumentIsValidIndex(messageIndex, len(self._messages),
                                "messageIndex")
     message = self._messages[messageIndex]
     variable = self._messageToVariableBinding.getValue(message)
     return self.updateMessageVariable(message, variable)
Exemplo n.º 3
0
 def sendMessageIndex(self, messageIndex):
     """Sends the ith message to the marginal and returns the log-normalization constant"""
     Guard.argumentIsValidIndex(messageIndex, len(self._messages), "messageIndex")
     message = self._messages[messageIndex]
     variable = self._messageToVariableBinding.getValue(message)
     return self.sendMessageVariable(message, variable)
Exemplo n.º 4
0
 def updateMessageIndex(self, messageIndex):
     """Update the message and marginal of the i-th variable that the factor is connected to"""
     Guard.argumentIsValidIndex(messageIndex, len(self._messages), "messageIndex")
     message = self._messages[messageIndex]
     variable = self._messageToVariableBinding.getValue(message)
     return self.updateMessageVariable(message, variable)