Rename Algorithms.RangeSearch.Core to Algorithms.RangeSearch.QuadTree

This commit is contained in:
2014-11-15 00:49:44 +01:00
parent c964afee10
commit 75c45149d9
4 changed files with 8 additions and 5 deletions

View File

@@ -1,4 +1,4 @@
module Algorithms.RangeSearch.Core
module Algorithms.RangeSearch.QuadTree
(quadTree,
quadTreeSquares,
qtFoldl,
@@ -107,7 +107,7 @@ quadTreeSquares sq (TNode nw ne sw se) =
quadTreeSquares (swSq sq) sw ++ quadTreeSquares (seSq sq) se
-- |Get the current square of the zipper, relative to the to the given top
-- |Get the current square of the zipper, relative to the given top
-- square.
getSquareByZipper :: Square -> Zipper a -> Square
getSquareByZipper sq z = go sq (reverse . snd $ z)
@@ -197,6 +197,9 @@ findNeighbor ot zr = case ot of
checkParent _ = Nothing
lookupByNeighbors :: [Orient] -> Zipper a -> Maybe (Zipper a)
lookupByNeighbors = flip (foldlM (flip findNeighbor))
testArr :: [PT]
testArr = [p2 (200.0, 450.0),