edge_to_splits function

Efficiently convert edge matrix to splits