Dirac-class              package:distr              R Documentation

_C_l_a_s_s "_D_i_r_a_c"

_D_e_s_c_r_i_p_t_i_o_n:

     The Dirac distribution with location l, by default =0, has density
     d(x) = 1 for x = l, 0 else.

_O_b_j_e_c_t_s _f_r_o_m _t_h_e _C_l_a_s_s:

     Objects can be created by calls of the form 'Dirac(location)'.
     This object is a 'Dirac' distribution.

_S_l_o_t_s:

     '_i_m_g': Object of class '"Naturals"': The space of the image of
          this distribution has got dimension 1 and the name "Real
          Space". 

     '_p_a_r_a_m': Object of class '"DiracParameter"': the parameter of this
          distribution (location), declared at its instantiation 

     '_r': Object of class '"function"': generates random numbers 

     '_d': Object of class '"function"': density function 

     '_p': Object of class '"function"': cumulative function 

     '_q': Object of class '"function"': inverse of the cumulative
          function 

     '_s_u_p_p_o_r_t': Object of class '"numeric"': a (sorted) vector
          containing the support of the discrete density function

_E_x_t_e_n_d_s:

     Class '"DiscreteDistribution"', directly.
      Class '"UnivariateDistribution"', by class
     '"DiscreteDistribution"'.
      Class '"Distribution"', by class '"DiscreteDistribution"'.

_M_e_t_h_o_d_s:

     _i_n_i_t_i_a_l_i_z_e 'signature(.Object = "Dirac")': initialize method 

     _l_o_c_a_t_i_o_n 'signature(object = "Dirac")': returns the slot
          'location' of the parameter of the distribution 

     _l_o_c_a_t_i_o_n<- 'signature(object = "Dirac")': modifies the slot
          'location' of the parameter of the distribution 

_A_u_t_h_o_r(_s):

     Thomas Stabla Thomas.Stabla@uni-bayreuth.de,
      Florian Camphausen Florian.Camphausen@uni-bayreuth.de,
      Peter Ruckdeschel Peter.Ruckdeschel@uni-bayreuth.de,
      Matthias Kohl Matthias.Kohl@uni-bayreuth.de

_S_e_e _A_l_s_o:

     'DiracParameter-class' 'DiscreteDistribution-class'
     'Naturals-class'

_E_x_a_m_p_l_e_s:

     D <- Dirac(location = 0) # D is a Dirac distribution with location=0.
     r(D)(1)
     # r(D)(1) generates a pseudo-random-number according to a Dirac
     # distribution with location = 0,
     # which of course will take 0 as value almost surely.
     d(D)(0) # Density of this distribution is 1 for x = 0.
     p(D)(1) # Probability that x < 1 is 1.
     q(D)(.1) # q(D)(x) is always 0 (= location).
     location(D) # location of this distribution is 0.
     location(D) <- 2 # location of this distribution is now 2.

