diprism / fggs

Factor Graph Grammars in Python
MIT License
13 stars 3 forks source link

Identity factors in sum_product_edges #128

Closed davidweichiang closed 1 year ago

davidweichiang commented 2 years ago

When sum_product_edges sees a node that appears both in edges and ext, it duplicates the node and puts an identity factor between them. This keeps things simple but is not very efficient. It would be better if sum_product_edges can avoid the duplication by returning some extra info. Hopefully that extra info can also get rid of the handling of disconnected external nodes, which is also not very efficient.

davidweichiang commented 2 years ago

Probably related: https://github.com/diprism/perpl/issues/97