Safe Haskell | Safe-Infered |
---|

Implementation of the PKTree spatial index data structure

The reccomended way to import this module is:

import qualified Data.PKTree as PKTree pkInsert = insert K [rx,ry,..]

- type Point = [Float]
- type Rectangle = (Point, Point)
- type PKTree a = Tree (Node a)
- data Node a
- cell :: Rectangle -> PKTree a
- pointCell :: Point -> a -> PKTree a
- rect :: PKTree a -> Rectangle
- insert :: Eq a => Int -> [Int] -> PKTree a -> Point -> a -> PKTree a
- radiusSearch :: Point -> Float -> PKTree a -> [(Point, a)]
- cubeSearch :: Rectangle -> Bool -> PKTree a -> [(Point, a)]

# Documentation

Inner nodes have rectangles, leaves are points and data

:: Eq a | |

=> Int | K, minimum number of nodes in subdivision |

-> [Int] | r, number of divisions in each dimension |

-> PKTree a | Root of PKTree |

-> Point | Point to insert |

-> a | Data that goes with point |

-> PKTree a |

Insert a point into a PKTree