dag2cpdag function

Convert a DAG to a CPDAG