public EdgeList(float xmin, float deltax, int sqrt_nsites) { _xmin = xmin; _deltax = deltax; _hashsize = 2 * sqrt_nsites; int i; _hash = new List <Halfedge>(_hashsize); while (_hash.Count < _hashsize) { _hash.Add(null); } // 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; }
private void Initialize() { _count = 0; _minBucket = 0; _hash = new Halfedge[_hashsize]; for (int i = 0; i < _hashsize; i++) { _hash[i] = Halfedge.CreateDummy(); _hash[i].nextInPriorityQueue = null; } }
private void Init() { int i; _count = 0; _minBucket = 0; _hash = new List <Halfedge>(_hashsize); // dummy Halfedge at the top of each hash for (i = 0; i < _hashsize; ++i) { _hash.Add(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; } }
public EdgeList(float xmin, float deltax, int sqrt_nsites) { _xmin = xmin; _deltax = deltax; _hashsize = 2 * sqrt_nsites; _hash = new Halfedge[_hashsize]; _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; }