Skip to content

Support type of Discrete distributions #681

@GordStephen

Description

@GordStephen

Right now Discrete distributions are assumed to have supports limited to Int values. This makes sense if the discrete distribution's support is assumed to serve as a proxy for some other set of non-numeric values, but the reworking of EmpiricalUnivariateDistribution (#661) and the proposed new Generic distribution (#634) both provide good examples of discrete distributions with numeric but potentially non-integer supports.

As far as I can tell this assumption is primarily relevant for preallocating arrays for random draws from samplers. Could we just have sampler implementations provide their own eltype method instead of inferring the support type from whether the distribution is continuous or discrete?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions