Add the new factor to a corresponding factor graph.
Add the new factor to a corresponding factor graph. If none of factor variables belong to existing factor graphs, then a new factor graph is created. If the new factor belongs to more than one factor graphs, then those factor graphs are merged.
Factor to be added to factor graph
List of candidate factor graphs that the new factor is to be added to