hgeometry-0.11.0.0: Geometric Algorithms, Data structures, and Data types.

Safe HaskellNone
LanguageHaskell2010

Data.Geometry.QuadTree.Split

Synopsis

Documentation

data Split i v p Source #

Data Type to Decide if we should continue splitting the current cell

Constructors

No !p 
Yes !v (Quadrants i) 
Instances
(Eq p, Eq v, Eq i) => Eq (Split i v p) Source # 
Instance details

Defined in Data.Geometry.QuadTree.Split

Methods

(==) :: Split i v p -> Split i v p -> Bool #

(/=) :: Split i v p -> Split i v p -> Bool #

(Ord p, Ord v, Ord i) => Ord (Split i v p) Source # 
Instance details

Defined in Data.Geometry.QuadTree.Split

Methods

compare :: Split i v p -> Split i v p -> Ordering #

(<) :: Split i v p -> Split i v p -> Bool #

(<=) :: Split i v p -> Split i v p -> Bool #

(>) :: Split i v p -> Split i v p -> Bool #

(>=) :: Split i v p -> Split i v p -> Bool #

max :: Split i v p -> Split i v p -> Split i v p #

min :: Split i v p -> Split i v p -> Split i v p #

(Show p, Show v, Show i) => Show (Split i v p) Source # 
Instance details

Defined in Data.Geometry.QuadTree.Split

Methods

showsPrec :: Int -> Split i v p -> ShowS #

show :: Split i v p -> String #

showList :: [Split i v p] -> ShowS #

_Yes :: forall i v p i v. Prism (Split i v p) (Split i v p) (v, Quadrants i) (v, Quadrants i) Source #

_No :: forall i v p p. Prism (Split i v p) (Split i v p) p p Source #

type Splitter r i v p = Cell r -> i -> Split i v p Source #

A splitter is a function that determines weather or not we should the given cell corresponding to the given input (i).

type Limiter r i v p = Splitter r i v p -> Splitter r i v (Either i p) Source #

Transformer that limits the depth of a splitter

limitWidthTo Source #

Arguments

:: WidthIndex

smallest allowed width of a cell (i.e. width of a leaf)

-> Limiter r i v p 

Split only when the Cell-width is at least wMin