@staticmethod
def from_inferlo_factor(f: DiscreteFactor):
    'Converts inferlo.DiscreteFactor to LDFactor.'
    rev_perm = list(range(len(f.var_idx)))[::(- 1)]
    prob = f.values.transpose(rev_perm).reshape((- 1))
    return LDFactor(f.model, f.var_idx, Prob(prob))
Converts inferlo.DiscreteFactor to LDFactor.
@staticmethod
def from_inferlo_factor(f: DiscreteFactor):
    
    rev_perm = list(range(len(f.var_idx)))[::(- 1)]
    prob = f.values.transpose(rev_perm).reshape((- 1))
    return LDFactor(f.model, f.var_idx, Prob(prob))