Objects from the Class
Objects can be created by calls of the form new("discDist", alpha, prob, dstr).
Either alpha and prob or dstr have to be provided.
The resulting object represents a discrete probability distribution over alphabet alpha
where the probabilities for individual symbols are given by prob.Slots
alpha:- A character vector containing all symbols of the alphabet.
prob:- Numeric vector of same length as
alpha with probabilities
for each symbol. dstr:- A
list of the form symbol = probability.
Extends
Class "dist", directly.Methods
- sampleObs
signature(dist = "discDist", size = "numeric"): sample observations from alpha
with probability prob.