Skip to content

Promote multiple precise rvs to better common supertype#299

Merged
FriesischScott merged 3 commits intomasterfrom
rv-dispatch
Feb 2, 2026
Merged

Promote multiple precise rvs to better common supertype#299
FriesischScott merged 3 commits intomasterfrom
rv-dispatch

Conversation

@FriesischScott
Copy link
Member

This PR overloads promote_rule for any two RandomVariables{<:UnivariateDistribution} such that the common type is not simply RandomVariable but RandomVariable{<:UnivariateDistribution}.

This allows to better dispatch on a vector of precise random variables where no ProbabilityBox is present.

Closes #298

@codecov
Copy link

codecov bot commented Feb 2, 2026

Codecov Report

❌ Patch coverage is 90.00000% with 1 line in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
src/inputs/randomvariables/randomvariable.jl 75.00% 1 Missing ⚠️

📢 Thoughts on this report? Let us know!

Copy link
Member

@lukasfritsch lukasfritsch left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good now, works for TMCMC, MAP and MLE and doesn't work when one of the input RVs is a p-box (as it should).

@FriesischScott FriesischScott merged commit 393136a into master Feb 2, 2026
9 checks passed
@FriesischScott FriesischScott deleted the rv-dispatch branch February 2, 2026 17:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Bayesian updating with multi-variate priors with different distribution families returns error

2 participants