I'm trying to create a custom distribution. I define:
immutable myDist <: DiscreteMultivariateDistribution
#code
end
function _logpdf{T<:Real}(d::myDist, X::AbstractVector{T})
# code
end
_pdf(d::myDist, X::AbstractVector) = exp(_logpdf(d, X))
I can succesfully create a distribution (i.e. d = myDist(...)) and I can
directly call _logpdf(d,x) on some data x. However, if I try to call
logpdf(d,x) (which is defined by the Distributions package) I get
ERROR: `_logpdf` has no method matching _logpdf(::myDist, ::Array{Int64,1})
in logpdf at
/Users/bdeonovic/.julia/v0.3/Distributions/src/multivariates.jl:66
why is this??