Rename Algorithms.RangeSearch.Core to Algorithms.RangeSearch.QuadTree
This commit is contained in:
parent
c964afee10
commit
75c45149d9
@ -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),
|
@ -54,7 +54,7 @@ executable Gtk
|
||||
main-is: GtkMain.hs
|
||||
|
||||
-- Modules included in this executable, other than Main.
|
||||
other-modules: MyPrelude GUI.Gtk Graphics.Diagram.Gtk Graphics.Diagram.Types Graphics.Diagram.Plotter Parser.PathParser Parser.Meshparser Parser.Core System.FileSystem.FileExt Algebra.Vector Algorithms.ConvexHull.GrahamScan QueueEx Algorithms.PolygonIntersection.Core Algorithms.RangeSearch.Core
|
||||
other-modules: MyPrelude GUI.Gtk Graphics.Diagram.Gtk Graphics.Diagram.Types Graphics.Diagram.Plotter Parser.PathParser Parser.Meshparser Parser.Core System.FileSystem.FileExt Algebra.Vector Algorithms.ConvexHull.GrahamScan QueueEx Algorithms.PolygonIntersection.Core Algorithms.RangeSearch.QuadTree
|
||||
|
||||
-- LANGUAGE extensions used by modules in this package.
|
||||
-- other-extensions:
|
||||
|
@ -4,7 +4,7 @@ module Graphics.Diagram.Plotter where
|
||||
|
||||
import Algebra.VectorTypes
|
||||
import Algorithms.ConvexHull.GrahamScan
|
||||
import Algorithms.RangeSearch.Core
|
||||
import Algorithms.RangeSearch.QuadTree
|
||||
import Algorithms.PolygonIntersection.Core
|
||||
import Data.Maybe
|
||||
import Data.Monoid
|
||||
|
@ -4,7 +4,7 @@ module Parser.PathParser where
|
||||
|
||||
import Control.Applicative
|
||||
import Parser.Core
|
||||
import Algorithms.RangeSearch.Core (Quad(NW, NE, SW, SE), Orient(North, South, West, East))
|
||||
import Algorithms.RangeSearch.QuadTree (Quad(NW, NE, SW, SE), Orient(North, South, West, East))
|
||||
|
||||
|
||||
-- |Parse a string such as "ne, n, sw, e" into
|
||||
|
Loading…
Reference in New Issue
Block a user