Пример #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)
Пример #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)
Пример #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)
Пример #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)