Add directed <-> undirected functions