Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Two-Way ZDD! #44

Open
wants to merge 8 commits into
base: main
Choose a base branch
from
Open

Two-Way ZDD! #44

wants to merge 8 commits into from

Conversation

gabeschoenbach
Copy link
Contributor

The majority of this PR involves adding two_way_zdd.jl, which creates the following functions:

  • construct_halfway_zdd() which is identical to construct_zdd() except it returns the list of Nodes at precisely the halfway point along the ZDD
  • number_compatible() which takes the two lists of nodes as given by construct_halfway_zdd() and some other arguments, and uses helper functions in two_way_zdd.jl to calculate the number of compatible pairs of "forward" and "backward" nodes. This number should be equal to the number of solutions to the whole ZDD.

This PR amends the zdd_jl.ipynb notebook to provide an example of using this new function. At present, it doesn't work — the number of compatible pairs doesn't match what we'd expect, and you can play around with checking how many pairs are weight-compatible only, fps-compatible, or cc-compatible, which might be helpful for debugging purposes.

Some additional changes this PR made that are not relevant to Two-Way:

  • Added a readable() function for comp_weights
  • Changed comp_weights in the recycler to initialize all weights to 0 (rather than undefined)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant