Closed mschauer closed 1 year ago
Nice implementation!
Going through vertices from low to high degree in line https://github.com/mschauer/CausalInference.jl/blob/e9bae30dd96e6491036617a5e35aaa76c5475902/src/pdag.jl#L160 is a potential optimization, but for sparse graphs it should not matter much in any case.
I started the following WIP PR https://github.com/mschauer/CausalInference.jl/pull/113 which is somewhat related as it is about counting and listing the consistent extensions of a PDAG/CPDAG (in contrast to finding an arbitrary one).
See https://ftp.cs.ucla.edu/pub/stat_ser/r185-dor-tarsi.pdf. The implementation marks the sinks which were already oriented in a bit vector and does not make a copy of the graph.