JuliaStats/Distributions.jl — pull request #237 by davidanthoff (2014-05-14 22:57:19+00:00)
Title: WIP: TriangularDist

This is my first stab at a asymmetric triangular distribution implementation.

This should NOT be merged yet because a) we first need to break downstream packages that rely on TriangularDist to be symmetric (see #220 discussion) and b) someone needs to do a VERY careful code and math review of this.

Generally I implemented this by taking equations from Wikipedia, and then writing tests where I computed the expected result in Mathematica. There are a couple of places in the code where I have comments where I was not entirely sure.

Also, this relies heavily on fallback methods, and I guess ideally we would want to have implementations of things like logpdf etc that are specific to TriangularDist. Additional commits on that would be welcome.