public void Run() { hpRtree = new HPRtree <string>(); stRtree = new STRtree <string>(); //loadRandom(NUM_ITEMS); LoadGrid(NUM_ITEMS); var sw = new Stopwatch(); sw.Start(); stRtree.Build(); sw.Stop(); Console.WriteLine($"STRtree build time: {sw.ElapsedMilliseconds}ms"); sw.Restart(); hpRtree.Build(); sw.Stop(); Console.WriteLine($"HPRtree build time: {sw.ElapsedMilliseconds}ms"); sw.Restart(); for (int i = 0; i < NUM_QUERY; i++) { QueryRandom(); } sw.Stop(); Console.WriteLine($"Query time: {sw.ElapsedMilliseconds}ms"); }
public override void StartRun(int size) { Console.WriteLine($"----- Tree size: {size}"); _index = new HPRtree <object>(NODE_SIZE); int side = (int)Math.Sqrt(size); LoadGrid(side, _index); var sw = new Stopwatch(); sw.Start(); _index.Build(); sw.Stop(); Console.WriteLine($"Build time = {sw.ElapsedMilliseconds}ms"); }
public void FinishInserting() { _index.Build(); }