Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add Convolve for DiscreteNonParametric (Redux) (#1850)
* Add convolve for DiscreteNonParametric DiscreteNonParametric convolution has a very nice trivial closed form. It was not implemented. This pull request implements it. * Update src/convolution.jl Co-authored-by: David Widmann <devmotion@users.noreply.github.com> * Use Set, instead of splatting. Co-authored-by: David Widmann <devmotion@users.noreply.github.com> * Fix type stability of elements. Doesn't preserve the type of the Vector, but perhaps this is better .... Co-authored-by: David Widmann <devmotion@users.noreply.github.com> * Apply suggestions from code review use functions to access the support and probabilities, and write as one loop. Co-authored-by: David Widmann <devmotion@users.noreply.github.com> * Added a test set. Removed check args: We know the convovultion is a proper distribution. * minor rename for consistency * Formatting, test improvements suggested by devmotion (and a few more) * Formatting --------- Co-authored-by: iampritishpatil <iampritishpatil@gmail.com> Co-authored-by: David Widmann <devmotion@users.noreply.github.com>
- Loading branch information