Skip to content

Implement prefix for Distributions.jl and depreciate NamedDist.  #759

@yebai

Description

@yebai

Let's use prefix to replace the slightly redundant NamedDist:

"""
A named distribution that carries the name of the random variable with it.
"""
struct NamedDist{variate,support,Td<:Distribution{variate,support},Tv<:VarName} <:
Distribution{variate,support}
dist::Td
name::Tv
end

x ~ prefix(Normal(), "var_`") # store `var_x` instead of `x` in `varinfo`. 

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