Example #1
0
        /// <summary>
        /// Returns list of all neighbor vertices of specified vertex
        /// </summary>
        public List <IVertex <T> > AdjacentVertices(IVertex <T> vertex)
        {
            if (!ContainsVertex(vertex))
            {
                throw new InvalidOperationException("Vertex does not belong to the graph.");
            }

            return(vertex.AdjacentVertices());
        }