public void Dispose() {
			// Get rid of dummies
			for (int i = 0; i < hashSize; i++) {
				hash[i].Dispose();
			}
			hash = null;
		}
		public void Dispose ()
		{
			// get rid of dummies
			for (int i = 0; i < _hashsize; ++i) {
				_hash [i].Dispose ();
				_hash [i] = null;
			}
			_hash = null;
		}
		public void Init() {
			count = 0;
			minBucked = 0;
			hash = new Halfedge[hashSize];
			// Dummy Halfedge at the top of each hash
			for (int i = 0; i < hashSize; i++) {
				hash[i] = Halfedge.CreateDummy();
				hash[i].nextInPriorityQueue = null;
			}
		}
		private void Initialize ()
		{
			int i;
		
			_count = 0;
			_minBucket = 0;
			_hash = new Halfedge[_hashsize];
			// dummy Halfedge at the top of each hash
			for (i = 0; i < _hashsize; ++i) {
				_hash [i] = Halfedge.CreateDummy ();
				_hash [i].nextInPriorityQueue = null;
			}
		}
Beispiel #5
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;
		}
Beispiel #6
0
		public EdgeList(float xmin, float deltaX, int sqrtSitesNb) {
			this.xmin = xmin;
			this.deltaX = deltaX;
			hashSize = 2 * sqrtSitesNb;

			hash = new Halfedge[hashSize];

			// Two dummy Halfedges:
			leftEnd = Halfedge.CreateDummy();
			rightEnd = Halfedge.CreateDummy();
			leftEnd.edgeListLeftNeighbor = null;
			leftEnd.edgeListRightNeighbor = rightEnd;
			rightEnd.edgeListLeftNeighbor = leftEnd;
			rightEnd.edgeListRightNeighbor = null;
			hash[0] = leftEnd;
			hash[hashSize - 1] = rightEnd;
		}
		public EdgeList (float xmin, float deltax, int sqrt_nsites)
		{
			_xmin = xmin;
			_deltax = deltax;
			_hashsize = 2 * sqrt_nsites;

			_hash = new Halfedge[_hashsize];
			
			// two dummy Halfedges:
			_leftEnd = Halfedge.CreateDummy ();
			_rightEnd = Halfedge.CreateDummy ();
			_leftEnd.edgeListLeftNeighbor = null;
			_leftEnd.edgeListRightNeighbor = _rightEnd;
			_rightEnd.edgeListLeftNeighbor = _leftEnd;
			_rightEnd.edgeListRightNeighbor = null;
			_hash [0] = _leftEnd;
			_hash [_hashsize - 1] = _rightEnd;
		}
		public void Dispose ()
		{
			Halfedge halfEdge = _leftEnd;
			Halfedge prevHe;
			while (halfEdge != _rightEnd) {
				prevHe = halfEdge;
				halfEdge = halfEdge.edgeListRightNeighbor;
				prevHe.Dispose ();
			}
			_leftEnd = null;
			_rightEnd.Dispose ();
			_rightEnd = null;

			int i;
			for (i = 0; i < _hashsize; ++i) {
				_hash [i] = null;
			}
			_hash = null;
		}
Beispiel #9
0
        private bool PQinitialize()
        {
            PQcount = 0;
            PQmin = 0;
            PQhashsize = 4 * sqrt_nsites;
            PQhash = new Halfedge[ PQhashsize ];

            for ( int i = 0; i < PQhashsize; i++ )
            {
                PQhash [i] = new Halfedge();
            }
            return true;
        }
Beispiel #10
0
        private bool ELinitialize()
        {
            ELhashsize = 2 * sqrt_nsites;
            ELhash = new Halfedge[ELhashsize];

            for (int i = 0; i < ELhashsize; i++)
            {
                ELhash[i] = null;
            }

            ELleftend = HEcreate ( null, 0 );
            ELrightend = HEcreate ( null, 0 );
            ELleftend.ELleft = null;
            ELleftend.ELright = ELrightend;
            ELrightend.ELleft = ELleftend;
            ELrightend.ELright = null;
            ELhash[0] = ELleftend;
            ELhash[ELhashsize - 1] = ELrightend;

            return true;
        }