Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The majority of this PR involves adding
two_way_zdd.jl
, which creates the following functions:construct_halfway_zdd()
which is identical toconstruct_zdd()
except it returns the list of Nodes at precisely the halfway point along the ZDDnumber_compatible()
which takes the two lists of nodes as given byconstruct_halfway_zdd()
and some other arguments, and uses helper functions intwo_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 areweight
-compatible only,fps
-compatible, orcc
-compatible, which might be helpful for debugging purposes.Some additional changes this PR made that are not relevant to Two-Way:
readable()
function forcomp_weights
comp_weights
in the recycler to initialize all weights to 0 (rather than undefined)