18 using System.Collections.Generic;
19 using Spatial4n.Core.Shapes;
21 namespace Lucene.Net.Spatial.Util
28 public class ShapeFieldCache<T> where T : Shape
30 private readonly IList<T>[] cache;
33 public ShapeFieldCache(
int length,
int defaultLength)
35 cache =
new IList<T>[length];
36 this.defaultLength = defaultLength;
39 public void Add(
int docid, T s)
41 IList<T> list = cache[docid];
44 list = cache[docid] =
new List<T>(defaultLength);
49 public IList<T> GetShapes(
int docid)