Skip to content

Commit

Permalink
Merge pull request #314 from JuliaStats/dh/test3
Browse files Browse the repository at this point in the history
A new testing framework for univariate distributions
  • Loading branch information
lindahua committed Nov 21, 2014
2 parents eb076e6 + eeb3929 commit aa636ee
Show file tree
Hide file tree
Showing 15 changed files with 6,679 additions and 264 deletions.
1 change: 1 addition & 0 deletions REQUIRE
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@ julia 0.3-
ArrayViews 0.4.8-
PDMats 0.3.1-
StatsBase 0.6.10-
JSON
2 changes: 1 addition & 1 deletion src/univariate/continuous/erlang.jl
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ immutable Erlang <: ContinuousUnivariateDistribution
new(int(shape), float64(scale), Gamma(shape, scale))
end

Erlang(scale::Real) = Erlang(scale, 1.0)
Erlang(shape::Real) = Erlang(shape, 1.0)
Erlang() = Erlang(1, 1.0)
end

Expand Down
2 changes: 1 addition & 1 deletion src/univariate/continuous/pareto.jl
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ immutable Pareto <: ContinuousUnivariateDistribution
end

Pareto() = Pareto(1.0, 1.0)
Pareto(scale::Real) = Pareto(scale, 1.0)
Pareto(shape::Real) = Pareto(shape, 1.0)

@distr_support Pareto d.scale Inf

Expand Down
1 change: 1 addition & 0 deletions src/univariate/discrete/negativebinomial.jl
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ immutable NegativeBinomial <: DiscreteUnivariateDistribution
new(float64(r), float64(p))
end

NegativeBinomial(r::Real) = NegativeBinomial(r, 0.5)
NegativeBinomial() = new(1.0, 0.5)
end

Expand Down
73 changes: 0 additions & 73 deletions test/continuous_ref.csv

This file was deleted.

Loading

0 comments on commit aa636ee

Please sign in to comment.