I'm working with CUDD C++ interface.
I'm finding not much information about this library.
How can I get the two children of a BDD?
For example:
Cudd mgr;
BDD x = mgr.bddVar();
BDD y = mgr.bddVar();
BDD f = x * y;
Now, with f, I want to get its then child and else child. The documentation says that DdNode has this children but I don't know how to access them.
Thank you.
You can access the then and else children of a Cudd BDD node as follows:
This gives DdNode pointer, which is the data structure used to refer to BDDs when using the plain C interface. You can get C++ objects again by:
Note that the above only works if f is not a complemented node. Otherwise, you have to run the result of calling "getNode" function through the Cudd_Regular function. Note that this inverts the meaning of the BDD.
You could also treat the BDDs like as if CuDD did not use inverted nodes. For this case, you would get then- and else-successors as follows: