public virtual FacetIterator Iterator()
 {
     if (_predefinedRanges != null)
     {
         BigSegmentedArray rangeCounts = new LazyBigIntArray(_predefinedRangeIndexes.Length);
         for (int k = 0; k < _predefinedRangeIndexes.Length; ++k)
         {
             int count = 0;
             int idx = _predefinedRangeIndexes[k][0];
             int end = _predefinedRangeIndexes[k][1];
             while (idx <= end)
             {
                 count += _count.Get(idx++);
             }
             rangeCounts.Add(k, rangeCounts.Get(k) + count);
         }
         return new DefaultFacetIterator(_predefinedRanges, rangeCounts, rangeCounts.Size(), true);
     }
     return null;
 }
 public virtual FacetIterator Iterator()
 {
     // each range is of the form <lat, lon, radius>
     LazyBigIntArray rangeCounts = new LazyBigIntArray(_latPredefinedRangeIndexes.Length);
     for (int i = 0; i < _latCount.Length; ++i)
     {
         if (_latCount[i] > 0)
         {
             for (int k = 0; k < _latPredefinedRangeIndexes.Length; ++k)
             {
                 if (i >= _latPredefinedRangeIndexes[k][0] && i <= _latPredefinedRangeIndexes[k][1])
                 {
                     rangeCounts.Add(k, rangeCounts.Get(k) + _latCount[i]);
                 }
             }
         }
     }
     return new DefaultFacetIterator(_predefinedRanges, rangeCounts, rangeCounts.Size(), true);
 }