Added sortedGraph class to get verticies by local one.