def __init__(self, alpha, eta, delta, EPS=1E-8, discretization=100):
        """Constructeur to set the parameters of the density."""

        LoiAPriori.__init__(self, EPS=EPS, discretization=discretization)

        #print('(3.-7.*eta-8.*delta)/6.0=', (3.-7.*eta-8.*delta)/6.0)
        #assert  alpha <= (3.-7.*eta-8.*delta)/6.0, print('PB, you should set alpha to a maximum value of ', (3.-7.*eta-8.*delta)/6.0, ' which corresponds to beta = 0')

        self.__alpha = alpha
        self.__eta = eta
        self.__delta = delta
        self.__beta = (1. - 2.5 * (delta + eta) + 1. / 6. *
                       (delta - eta)) / 2.0 - self.__alpha
        #print('self.__beta=', self.__beta)

        temp = 2. * (self.__alpha + self.__beta) + 2.5 * (
            self.__eta + self.__delta) - 1. / 6. * (self.__delta - self.__eta)
        assert np.abs(temp - 1.0) < 1.E-6, print(
            'Pb : this value should be 1 : ', temp)
        #print(' 2 alpha + 2 beta = ', 2.*self.__alpha+2.*self.__beta)
        #print('beta = ', self.__beta)

        #        assert self.__alpha>=0. and self.__alpha<=1., print('PB : alpha=', self.__alpha)
        #        assert self.__beta>=0.  and self.__beta<=1.,  print('PB : beta =', self.__beta)
        #        assert self.__eta>=0.   and self.__eta<=1.,   print('PB : eta  =', self.__eta)
        #        assert self.__delta>=0. and self.__delta<=1., print('PB : delta=', self.__delta)

        self.update()
    def __init__(self, alpha, gamma, EPS=1E-8, discretization=100):
        """Constructeur to set the parameters of the density."""

        LoiAPriori.__init__(self, EPS=EPS, discretization=discretization)

        assert alpha <= (1. - 3. * gamma) / 2., \
                    print('PB, you should set alpha to a maximum value of ', \
                    (1. - 5. * gamma) / 2., ' which corresponds to beta = 0')

        self.__alpha = alpha
        self.__gamma = gamma
        self.__beta = (1. - 5 * self.__gamma) / 2. - self.__alpha

        temp = 2. * self.__alpha + 2. * self.__beta + 5. * self.__gamma
        assert temp == 1.0, print('Pb : this value should be 1 : ', temp)
        #print(' 2 alpha + 2 beta = ', 2.*self.__alpha+2.*self.__beta)
        #print('beta = ', self.__beta)

        assert self.__alpha >= 0. and self.__alpha <= 1., \
            print('PB : alpha=', self.__alpha)
        assert self.__beta >= 0. and self.__beta <= 1., \
            print('PB : beta =', self.__beta)
        assert self.__gamma >= 0. and self.__gamma <= 1., \
            print('PB : gamma=', self.__gamma)

        self.update()
示例#3
0
    def __init__(self, alpha, eta, delta, lamb, EPS=1E-8, discretization=100):
        """Constructeur to set the parameters of the density."""

        LoiAPriori.__init__(self, EPS=EPS, discretization=discretization)

        self.__alpha = alpha
        self.__eta = eta
        self.__delta = delta
        self.__lamb = lamb
        self.__beta = 0.5 - delta/6. - eta*(lamb+1./3.) - self.__alpha
        #print('test ph=', 2.*(self.__alpha + self.__beta) + self.__lamb * self.__eta)
        #print('test pf=', 1./3.*(self.__delta-self.__eta) + self.__eta *(self.__lamb +1.))

        self.update()
    def __init__(self, alpha0, alpha1, beta, EPS=1E-8, discretization=100):
        """Constructeur to set the parameters of the density."""

        LoiAPriori.__init__(self, EPS=EPS, discretization=discretization)

        self.__alpha0 = alpha0
        self.__alpha1 = alpha1
        self.__beta = beta
        self.__eta = 3. / 8. * (1. - self.__alpha0 - self.__alpha1 -
                                2. * self.__beta)
        if self.__eta < 0.: self.__eta = 0.  # erreur d'arrondi
        #print('self.__eta=', self.__eta)

        self.update()
示例#5
0
    def __init__(self, alpha, beta, delta, lamb, EPS=1E-8, discretization=100):
        """Constructeur to set the parameters of the density."""

        LoiAPriori.__init__(self, EPS=EPS, discretization=discretization)

        self.__alpha = alpha
        self.__beta = beta

        assert delta >= 0. and delta <= 0.5, print('PB : delta=', delta)
        self.__delta = delta
        assert lamb >= 0.
        self.__lamb = lamb

        self.update()
示例#6
0
    def __init__(self, alpha, delta, EPS=1E-8, discretization=100):
        """Constructeur to set the parameters of the density."""

        LoiAPriori.__init__(self, EPS=EPS, discretization=discretization)

        self.__alpha = alpha

        assert delta > 0. or delta <= 0.5, print('PB : delta=', delta)
        self.__delta = delta

        if self.__delta != 0.:
            self.__gamma = (1. - 2. * self.__alpha) / (self.__delta *
                                                       (6. - self.__delta))
        else:
            self.__gamma = 0.  # normalement non utilisé
            self.__alpha = 0.5

        self.update()
    def __init__(self, alpha, gamma, delta, EPS=1E-8, discretization=100):
        """Constructeur to set the parameters of the density."""

        LoiAPriori.__init__(self, EPS=EPS, discretization=discretization)

        self.__alpha = alpha

        assert delta >= 0. and delta <= 0.5, print('PB : delta=', delta)
        self.__delta = delta

        M = self.__delta * (6. - self.__delta)
        if M != 0.:
            if gamma >= (1. - 2. * self.__alpha) / M:
                self.__gamma = (1. - 2. * self.__alpha) / M - 1E-10
            else:
                self.__gamma = gamma
        else:
            self.__gamma = 0.
            print('   ---> Attention : gamma == 0.')
            #input('pause')

        self.__beta = (1. - self.__gamma * M) / 2. - self.__alpha

        self.update()