From 49c311c71f534feb4744551c0c40907d3eae8433 Mon Sep 17 00:00:00 2001 From: abhro <5664668+abhro@users.noreply.github.com> Date: Sat, 25 Jan 2025 15:24:23 -0500 Subject: [PATCH 1/2] Add type header and backticks to AbstractMixtureModel docstrings --- src/mixtures/mixturemodel.jl | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/mixtures/mixturemodel.jl b/src/mixtures/mixturemodel.jl index c3d3b1f919..d4d72fe27e 100644 --- a/src/mixtures/mixturemodel.jl +++ b/src/mixtures/mixturemodel.jl @@ -1,14 +1,15 @@ # finite mixture models """ + AbstractMixtureModel <: Distribution - All subtypes of `AbstractMixtureModel` should implement the following methods: +All subtypes of `AbstractMixtureModel` should implement the following methods: - - ncomponents(d): the number of components + - `ncomponents(d)`: the number of components - - component(d, k): return the k-th component + - `component(d, k)`: return the k-th component - - probs(d): return a vector of prior probabilities over components. + - `probs(d)`: return a vector of prior probabilities over components. """ abstract type AbstractMixtureModel{VF<:VariateForm,VS<:ValueSupport,C<:Distribution} <: Distribution{VF, VS} end From a40679c5ae347f9b6b499abb3f0f4304ff9ae36f Mon Sep 17 00:00:00 2001 From: abhro <5664668+abhro@users.noreply.github.com> Date: Sat, 25 Jan 2025 15:25:07 -0500 Subject: [PATCH 2/2] Fix type header for MixtureModel docstring --- src/mixtures/mixturemodel.jl | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/mixtures/mixturemodel.jl b/src/mixtures/mixturemodel.jl index d4d72fe27e..f25fb82d9c 100644 --- a/src/mixtures/mixturemodel.jl +++ b/src/mixtures/mixturemodel.jl @@ -14,7 +14,8 @@ All subtypes of `AbstractMixtureModel` should implement the following methods: abstract type AbstractMixtureModel{VF<:VariateForm,VS<:ValueSupport,C<:Distribution} <: Distribution{VF, VS} end """ -MixtureModel{VF<:VariateForm,VS<:ValueSupport,C<:Distribution,CT<:Real} + MixtureModel{VF<:VariateForm,VS<:ValueSupport,C<:Distribution,CT<:Real} + A mixture of distributions, parametrized on: * `VF,VS` variate and support * `C` distribution family of the mixture