Closed fsaad closed 4 years ago
Implemented in https://github.com/probcomp/sum-product-dsl/commit/4ac7d47255f9057deb01ddf1c70f9bb17e73e766 for logprob---condition is more complicated, since finding the disjoint union is often more expensive than the linear pruning, plus we already memoize those computations
Rather than iterate through all 2^m subsets, first compute the probabilities of the m conjunctions and immediately return 0 if each conjunction in the union has probability zero, which removes the duplicate computation inside prune_events.