SSoelvsten / adiar

An I/O-efficient implementation of (Binary) Decision Diagrams
https://ssoelvsten.github.io/adiar/
MIT License
24 stars 13 forks source link

Add `bdd_printdot` and `zdd_printdot` alternatives #232

Closed SSoelvsten closed 2 years ago

SSoelvsten commented 2 years ago

Currently, adiar/dot.h provides the following two functions in adiar/internal/dot.h

template <typename T>
void output_dot(const T& nodes, const std::string &filename);

void output_dot(const arc_file& arcs, const std::string &filename);

We should move the implementation to a more generic function that has its second argument being

These should then also be indirectly added to adiar/bdd.h and adiar/zdd.h . This could be done together with #380 .

SSoelvsten commented 2 years ago

Given FILE is a C thing, I'd wait to add it to the public API until someone actually needs it. Now that the std::ostream is provided, one can already do it themselves, by providing the output stream to the FILE.