Skip to content

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)

@gabeschoenbach gabeschoenbach requested a review from bsuwal March 12, 2021 20:38
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.

2 participants