Example #1
0
        public void Dispose()
        {
            Halfedge halfedge = leftEnd;
            Halfedge prevHe;

            while (halfedge != rightEnd)
            {
                prevHe   = halfedge;
                halfedge = halfedge.edgeListRightNeighbor;
                prevHe.Dispose();
            }
            leftEnd = null;
            rightEnd.Dispose();
            rightEnd = null;

            hash = null;
        }
Example #2
0
        public void Remove(Halfedge halfedge)
        {
            Halfedge previous;
            int      removalBucket = Bucket(halfedge);

            if (halfedge.vertex != null)
            {
                previous = hash[removalBucket];
                while (previous.nextInPriorityQueue != halfedge)
                {
                    previous = previous.nextInPriorityQueue;
                }
                previous.nextInPriorityQueue = halfedge.nextInPriorityQueue;
                count--;
                halfedge.vertex = null;
                halfedge.nextInPriorityQueue = null;
                halfedge.Dispose();
            }
        }