예제 #1
0
 public override void Query(double queryMin, double queryMax, IItemVisitor <T> visitor)
 {
     if (!Intersects(queryMin, queryMax))
     {
         //			System.out.println("Does NOT Overlap branch: " + this);
         return;
     }
     //		System.out.println("Overlaps branch: " + this);
     if (_node1 != null)
     {
         _node1.Query(queryMin, queryMax, visitor);
     }
     if (_node2 != null)
     {
         _node2.Query(queryMin, queryMax, visitor);
     }
 }
예제 #2
0
        ///<summary>
        /// Search for intervals in the index which intersect the given closed interval
        /// and apply the visitor to them.
        ///</summary>
        /// <param name="min">The lower bound of the query interval</param>
        /// <param name="max">The upper bound of the query interval</param>
        /// <param name="visitor">The visitor to pass any matched items to</param>
        public void Query(double min, double max, IItemVisitor <T> visitor)
        {
            Init();

            _root.Query(min, max, visitor);
        }