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; } }
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; }