Skip to content

prod between Wishart and WishartFast is not defined #192

@bvdmitri

Description

@bvdmitri

Apparently we did not define an analytical product between Wishart and WishartFast. WishartFast is just slightly more optimized version of Wishart , which we use for messages. I propose for such a prod we simply convert Wishart to WishartFast and just call the product between two WishartFast objects.

BayesBase.default_prod_rule(::Type{<:Wishart}, ::Type{<:WishartFast}) = PreserveTypeProd(Distribution)

function BayesBase.prod(::PreserveTypeProd{Distribution}, left::Wishart, right::WishartFast)
    return prod(PreserveTypeProd(Distribution), convert(WishartFast, left), right)
end

We can put a new product right after this one. And the convert methods are already implemented here, so no extra work required for them.

@Nimrais can you add those and also implement similar for InverseWishartFast?

Metadata

Metadata

Assignees

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