def _belief_v(self, i: int) -> LDFactor:
    p = self._calc_belief_v(i)
    if self.logdomain:
        p.p = np.exp((p.p - np.max(p.p)))
    p.normalize()
    return LDFactor(self.model, [i], p)
def _belief_v(self, i: int) -> LDFactor:
    p = self._calc_belief_v(i)
    if self.logdomain:
        p.p = np.exp((p.p - np.max(p.p)))
    p.normalize()
    return LDFactor(self.model, [i], p)