probcomp / hierarchical-irm

Probabilistic structure discovery for rich relational systems
Apache License 2.0
1 stars 1 forks source link

Refactor Relation<DistributionType> to Relation<ValueType> #70

Closed ThomasColthurst closed 4 days ago

ThomasColthurst commented 5 days ago

This has lots of advantages, including the fact that new Distributions no longer need to touch relation_variant.* In general, I think it is a code smell for a class to be templated over a type that doesn't appear in its methods (ValueType appears in Relation's methods, but DistributionType doesn't .)

Plus fixed some memory leaks.

Plus added a typename_playground that makes it easier to iteratively write decltype and typename code and figure out what is going wrong.