private void Initialize()
        {
            int i;

            this.count     = 0;
            this.minBucket = 0;
            this.hash      = new List <HalfEdge>(hashSize);

            for (i = 0; i < hashSize; i++)
            {
                hash.Add(HalfEdge.CreateDummy());
                hash[i].nextInPriorityQueue = null;
            }
        }
Пример #2
0
        public EdgeList(double xMin, double deltaX, int sqrtNSites)
        {
            this.xMin     = xMin;
            this.deltaX   = deltaX;
            this.hashSize = (2 * sqrtNSites);
            hash          = new List <HalfEdge>(hashSize);

            leftEnd  = HalfEdge.CreateDummy();
            rightEnd = HalfEdge.CreateDummy();
            leftEnd.edgeListLeftNeighbor   = null;
            leftEnd.edgeListRightNeighbor  = rightEnd;
            rightEnd.edgeListLeftNeighbor  = leftEnd;
            rightEnd.edgeListRightNeighbor = null;

            hash.Add(leftEnd);
            for (int i = 1; i < hashSize - 1; i++)
            {
                hash.Add(null);
            }
            hash.Add(rightEnd);
        }