public List <Vertex <T> > GetAdjacentVertices(int sourceIndex) { List <int> adjacentIndices = _adjacencyMatrix.GetAdjacencyList(sourceIndex); List <Vertex <T> > adjacentVertices = new List <Vertex <T> >(); foreach (int vertexIndex in adjacentIndices) { adjacentVertices.Add(_vertices[vertexIndex]); } return(adjacentVertices); }