@@ -61,8 +61,8 @@ weights(mgmm::AbstractMultiGMM) = vcat([weights(gmm) for (k,gmm) in mgmm.gmms]..
6161widths (mgmm:: AbstractMultiGMM ) = vcat ([widths (gmm) for (k,gmm) in mgmm. gmms]. .. )
6262
6363"""
64- A structure that defines an isotropic Gaussian distribution with the location of the mean, `μ`, standard deviation `σ`,
65- and scaling factor `ϕ`.
64+ A structure that defines an isotropic Gaussian distribution with the location of the mean, `μ`, standard deviation `σ`,
65+ and scaling factor `ϕ`.
6666
6767"""
6868struct IsotropicGaussian{N,T} <: AbstractIsotropicGaussian{N,T}
8080IsotropicGaussian (g:: AbstractIsotropicGaussian ) = IsotropicGaussian (g. μ, g. σ, g. ϕ)
8181
8282convert (:: Type{IsotropicGaussian{N,T}} , g:: AbstractIsotropicGaussian ) where {N,T} = IsotropicGaussian (SVector {N,T} (g. μ), T (g. σ), T (g. ϕ))
83- promote_rule (:: Type{IsotropicGaussian{N,T}} , :: Type{IsotropicGaussian{N,S}} ) where {N,T<: Real ,S<: Real } = IsotropicGaussian{N,promote_type (T,S)}
83+ promote_rule (:: Type{IsotropicGaussian{N,T}} , :: Type{IsotropicGaussian{N,S}} ) where {N,T<: Real ,S<: Real } = IsotropicGaussian{N,promote_type (T,S)}
8484
85+ (g:: IsotropicGaussian )(pos:: AbstractVector ) = exp (- sum (abs2, pos- g. μ)/ (2 * g. σ^ 2 ))* g. ϕ
8586
8687"""
8788A collection of `IsotropicGaussian`s, making up a Gaussian Mixture Model (GMM).
@@ -95,9 +96,11 @@ IsotropicGMM(gmm::AbstractIsotropicGMM) = IsotropicGMM(gmm.gaussians)
9596convert (t:: Type{IsotropicGMM} , gmm:: AbstractIsotropicGMM ) = t (gmm. gaussians)
9697promote_rule (:: Type{IsotropicGMM{N,T}} , :: Type{IsotropicGMM{N,S}} ) where {T,S,N} = IsotropicGMM{N,promote_type (T,S)}
9798
99+ (gmm:: IsotropicGMM )(pos:: AbstractVector ) = sum (g (pos) for g in gmm. gaussians)
100+
98101"""
99- A collection of labeled `IsotropicGMM`s, to each be considered separately during an alignment procedure. That is,
100- only alignment scores between `IsotropicGMM`s with the same key are considered when aligning two `MultiGMM`s.
102+ A collection of labeled `IsotropicGMM`s, to each be considered separately during an alignment procedure. That is,
103+ only alignment scores between `IsotropicGMM`s with the same key are considered when aligning two `MultiGMM`s.
101104"""
102105struct IsotropicMultiGMM{N,T,K} <: AbstractIsotropicMultiGMM{N,T,K}
103106 gmms:: Dict{K, IsotropicGMM{N,T}}
0 commit comments