Add a component for the given element to this problem.
Components directly defined in this problem.
Determines if this problem contains the given problem.
Determines if this problem contains the given problem. Any variables in the contained problem should also be eliminated when this problem is solved.
Determines if a variable is in scope outside of this problem
Components outside of this problem that appear in the solution to this problem.
Determines if a variable is internal to this problem and should be eliminated
Produce a single weighted sample of all the elements in this problem.
Factors over globals produced by solving the problem.
Solve the problem defined by all the components' current factors.
Solve the problem defined by all the components' current factors. This will also set the globals accordingly. All components in this problem and contained subproblems should be eliminated in the solution.
A flag indicating whether the problem has been solved.
A Problem defines an inference problem to be solved. It includes a set of components directly contained in the problem. These components might have nested subproblems. It also refers to global components that are outside of this problem. The targets are elements that appear in this problem that are visible outside. They might be newly defined in this problem or they might be defined previously, but either way, they should not be eliminated.