diprism / fggs

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

Extend sum_product to more semirings #125

Closed davidweichiang closed 2 years ago

davidweichiang commented 2 years ago

Previously only fixed-point worked with all semirings.

Linear now also works with all semirings, using Floyd-Warshall for solving the equations.

Newton's method works with all semirings except Boolean (which it's not supposed to work for). It relies on a "subtraction" operator for semirings.

davidweichiang commented 2 years ago

Closes #118 Addresses but doesn't close #122

davidweichiang commented 2 years ago

I'm just putting some changes from #127 into here because they fit better here; it's ready to merge any time.

davidweichiang commented 2 years ago

@kennethsible Do you want to submit the cleaning PR (#52) first or do you want me to merge this first?

kennethsible commented 2 years ago

@kennethsible Do you want to submit the cleaning PR (#52) first or do you want me to merge this first?

I can handle any potential conflicts with the cleaning PR #52, so you can merge this now.