Handle unique segments, with directed and undirected options