def HP(self,v,par):
        if self.prior==None:
            return max(2,v.n_disc)
        else:
            hp=float(self.prior)
            for p in par:
                hp/=max(2,p.n_disc)
            return hp