def _construct(self):
    'Helper function for constructors.'
    self._edges = []
    for i in range(self.nrVars):
        self._edges.append([])
        for _ in self.nbV[i]:
            size = self._var_size(i)
            new_ep = EdgeProp(index=None, message=Prob.uniform(size), new_message=Prob.uniform(size), residual=0.0)
            self._edges[i].append(new_ep)
    self._oldBeliefsV = []
    for i in range(self.nrVars):
        self._oldBeliefsV.append(LDFactor.uniform(self.model, [i]))
    self._old_beliefs_f = []
    for ii in range(self.nrFactors):
        self._old_beliefs_f.append(LDFactor.uniform(self.model, self.factors[ii].var_idx))
    self._update_seq = []
    for ii in range(self.nrFactors):
        for i in self.nbF[ii]:
            self._update_seq.append((i.node, i.dual))
Helper function for constructors.
def _construct(self):
    
    self._edges = []
    for i in range(self.nrVars):
        self._edges.append([])
        for _ in self.nbV[i]:
            size = self._var_size(i)
            new_ep = EdgeProp(index=None, message=Prob.uniform(size), new_message=Prob.uniform(size), residual=0.0)
            self._edges[i].append(new_ep)
    self._oldBeliefsV = []
    for i in range(self.nrVars):
        self._oldBeliefsV.append(LDFactor.uniform(self.model, [i]))
    self._old_beliefs_f = []
    for ii in range(self.nrFactors):
        self._old_beliefs_f.append(LDFactor.uniform(self.model, self.factors[ii].var_idx))
    self._update_seq = []
    for ii in range(self.nrFactors):
        for i in self.nbF[ii]:
            self._update_seq.append((i.node, i.dual))