You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
pub trait BddBuilder<'a>: BottomUpBuilder<'a, BddPtr<'a>> {
/// swaps variables `a` and `b` in the variable order.
/// all pointers into the manager are invalidated.
/// returns a new manager and root list, where the order of roots in the returned list
/// matches the order provided by `roots.`
fn swap(manager: BddManger<'a>, roots: Vec<BddPtr<'a>, a: VarLabel, b: VarLabel) -> (Manager<'b>, Vec<BddPtr<'b>>;
/// reorders all BDDs to have the order `order`.
/// all pointers into the manager are invalidated.
/// returns a new manager and root list, where the order of roots in the returned list
/// matches the order provided by `roots.`
fn reorder(manager: BddManger<'a>, roots: Vec<BddPtr<'a>, order: VarOrder) -> (Manager<'b>, Vec<BddPtr<'b>>;
}
Swapping adjacent variables in a BDD is efficient. Swapping two arbitrary variables can be accomplished by repeated swapping of adjacent variables.
Here is a document visualizing swapping and describing how to efficiently implement it: variable-swap.pdf
Add a
swap
method to theBddBuilder
trait:variable-swap.pdf
reorder
should be implemented in terms ofswap
.The text was updated successfully, but these errors were encountered: