def __init__(self, mu, sig, w=1):
     Potential.__init__(self, symmetric=False)
     self.mu = np.array(mu)
     self.sig = np.matrix(sig)
     self.prec = self.sig.I
     det = np.linalg.det(self.sig)
     p = float(len(mu))
     if det == 0:
         raise NameError("The covariance matrix can't be singular")
     self.coefficient = w / (pow(2 * pi, p * 0.5) * pow(det, 0.5))
 def __init__(self, A, b, c):
     """
     :param A: an array of shape [v1, v2, ..., v_Nd, Nc, Nc], where v1, ..., v_Nd are the number of states of the Nd
     discrete nodes in the scope, and Nc is the number of continuous nodes
     :param b: an array of shape [v1, v2, ..., v_Nd, Nc]
     :param c: an array of shape [v1, v2, ..., v_Nd]
     :return:
     """
     Potential.__init__(self, symmetric=False)
     self.A = A
     self.b = b
     self.c = c
     self.Nd = len(c.shape)  # num disc nodes
     self.Nc = int(b.shape[-1])  # num cont nodes
     self.log_potential = LogHybridQuadratic(A, b, c)
 def __init__(self, A, b, c):
     Potential.__init__(self, symmetric=False)
     self.A = np.array(A)
     self.b = np.array(b)
     self.c = c
     self.log_potential = LogQuadratic(A, b, c)
 def __init__(self, distant_cof, scaling_cof, max_threshold):
     Potential.__init__(self, symmetric=True)
     self.distant_cof = distant_cof
     self.scaling_cof = scaling_cof
     self.max_threshold = max_threshold
     self.v = pow(e, -self.max_threshold / self.scaling_cof)
 def __init__(self, mu, sig):
     Potential.__init__(self, symmetric=True)
     self.mu = mu
     self.sig = sig
 def __init__(self, coeff, sig):
     Potential.__init__(self, symmetric=True)
     self.coeff = coeff
     self.sig = sig
 def __init__(self, table, symmetric=False):
     Potential.__init__(self, symmetric=symmetric)
     self.table = table