Implementing Vertex Connection and Merging