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)
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)
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)
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)