This function convolutes two discrete distribution, each given by strictly increasing support vectors
and corresponding probability vectors.
Usage
conv(x1,p1,x2,p2)
Value
A matrix with first column the new support vector and the second column the
corresponding probability vector.
Arguments
x1
support vector of the first distribution, with strictly increasing elements.
p1
vector of probabilities corresponding to x1.
x2
support vector of the second distribution, with strictly increasing elements.
p2
vector of probabilities corresponding to x2.
Details
The convolution is performed in C, looping through all paired sums,
augmenting existing values or inserting them with an update of the
corresponding probabilities.