Exemplo n.º 1
0
        public void Dispose()
        {
            HalfEdge hE = leftEnd;
            HalfEdge prevHE;

            while (hE != rightEnd)
            {
                prevHE = hE;
                hE     = hE.edgeListRightNeighbor;
                prevHE.Dispose();
            }
            leftEnd = null;
            rightEnd.Dispose();
            rightEnd = null;

            hash.Clear();
            hash = null;
        }
        public void Remove(HalfEdge hE)
        {
            HalfEdge prev;
            int      rBucket = Bucket(hE);

            if (hE.v != null)
            {
                prev = hash[rBucket];
                while (prev.nextInPriorityQueue != hE)
                {
                    prev = prev.nextInPriorityQueue;
                }
                prev.nextInPriorityQueue = hE.nextInPriorityQueue;
                this.count--;
                hE.v = null;
                hE.nextInPriorityQueue = null;
                hE.Dispose();
            }
        }