def _update_message(self, i: int, _I: int):
    if recordSentMessages:
        self._sentMessages.append((i, _I))
    if (self.damping == 0.0):
        self._edges[i][_I].message = self._edges[i][_I].new_message.clone()
        if (self.updates == 'SEQMAX'):
            self._update_residual(i, _I, 0.0)
    else:
        d = self.damping
        old_msg = self._edges[i][_I].message.p
        new_msg = self._edges[i][_I].new_message.p
        if self.logdomain:
            self._edges[i][_I].message.p = ((old_msg * d) + (new_msg * (1.0 - d)))
        else:
            self._edges[i][_I].message.p = ((old_msg ** d) * (new_msg ** (1.0 - d)))
        if (self.updates == 'SEQMAX'):
            new_res = dist_linf(self._edges[i][_I].new_message, self._edges[i][_I].message)
            self._update_residual(i, _I, new_res)
def _update_message(self, i: int, _I: int):
    if recordSentMessages:
        self._sentMessages.append((i, _I))
    if (self.damping == 0.0):
        self._edges[i][_I].message = self._edges[i][_I].new_message.clone()
        if (self.updates == 'SEQMAX'):
            self._update_residual(i, _I, 0.0)
    else:
        d = self.damping
        old_msg = self._edges[i][_I].message.p
        new_msg = self._edges[i][_I].new_message.p
        if self.logdomain:
            self._edges[i][_I].message.p = ((old_msg * d) + (new_msg * (1.0 - d)))
        else:
            self._edges[i][_I].message.p = ((old_msg ** d) * (new_msg ** (1.0 - d)))
        if (self.updates == 'SEQMAX'):
            new_res = dist_linf(self._edges[i][_I].new_message, self._edges[i][_I].message)
            self._update_residual(i, _I, new_res)