Exemplo n.º 1
0
        public static IEnumerable <TEdge> GetOutEdges <TVertex, TEdge>(this IBidirectionalGraph <TVertex, TEdge> graph, TVertex vertex)
            where TEdge : IEdge <TVertex>
        {
            var result = new List <TEdge>();
            IEnumerable <TEdge> edges;

            graph.TryGetOutEdges(vertex, out edges);
            if (edges != null)
            {
                result.AddRange(edges);
            }
            return(result);
        }