Exemple #1
0
        public Graph.EdgeEnumerator GetEdgeEnumerator(uint vertex)
        {
            if ((long)vertex >= this._vertices.Length)
            {
                throw new ArgumentOutOfRangeException("vertex", "vertex is not part of this graph.");
            }
            Graph.EdgeEnumerator edgeEnumerator = new Graph.EdgeEnumerator(this);
            int num = (int)vertex;

            edgeEnumerator.MoveTo((uint)num);
            return(edgeEnumerator);
        }
Exemple #2
0
        public int RemoveEdges(uint vertex)
        {
            int num = 0;

            Graph.EdgeEnumerator edgeEnumerator = this.GetEdgeEnumerator(vertex);
            while (edgeEnumerator.MoveNext())
            {
                if (this.RemoveEdge(vertex, edgeEnumerator.To))
                {
                    ++num;
                }
            }
            return(num);
        }