//--------------------------------------------------------------------- private void Initialize(IInputGrid <bool> activeSites) { if (Count > int.MaxValue) { string mesg = string.Format("Landscape dimensions are too big; maximum # of sites = {0:#,###}", int.MaxValue); throw new System.ApplicationException(mesg); } dataIndexes = new Landscapes.DataIndexes.Array2D(activeSites); activeSites.Close(); inactiveSiteCount = SiteCount - (int)dataIndexes.ActiveLocationCount; }
//--------------------------------------------------------------------- internal ActiveSiteEnumerator(ILandscape landscape, DataIndexes.Collection dataIndexes) { this.landscape = landscape; this.activeLocationEtor = dataIndexes.GetActiveLocationEnumerator(); }