def pointwise_product(self, other, bn):
vars = list(set(self.vars) | set(other.vars))<EOL>cpt = dict((event_values(e, vars), self.p(e) * other.p(e))<EOL>for e in all_events(vars, bn, {}))<EOL>return Factor(vars, cpt)<EOL>
Multiply two factors, combining their variables.