computational-geometry-0.1.0.1: Collection of algorithms in Computational Geometry.

Copyright(C) 2017 Maksymilian Owsianny
LicenseBSD-style (see LICENSE)
MaintainerMaksymilian.Owsianny@gmail.com
Safe HaskellNone
LanguageHaskell2010

Geometry.SetOperations.BSP

Description

 

Synopsis

Documentation

data BinaryTree l n Source #

Binary Tree parametrized by leafs and nodes

Constructors

Node (BinaryTree l n) !n (BinaryTree l n) 
Leaf !l 

Instances

Bifunctor BinaryTree Source # 

Methods

bimap :: (a -> b) -> (c -> d) -> BinaryTree a c -> BinaryTree b d #

first :: (a -> b) -> BinaryTree a c -> BinaryTree b c #

second :: (b -> c) -> BinaryTree a b -> BinaryTree a c #

Functor (BinaryTree l) Source # 

Methods

fmap :: (a -> b) -> BinaryTree l a -> BinaryTree l b #

(<$) :: a -> BinaryTree l b -> BinaryTree l a #

(Eq l, Eq n) => Eq (BinaryTree l n) Source # 

Methods

(==) :: BinaryTree l n -> BinaryTree l n -> Bool #

(/=) :: BinaryTree l n -> BinaryTree l n -> Bool #

(Show l, Show n) => Show (BinaryTree l n) Source # 

Methods

showsPrec :: Int -> BinaryTree l n -> ShowS #

show :: BinaryTree l n -> String #

showList :: [BinaryTree l n] -> ShowS #

cmp :: BSP a -> BSP a Source #

Complementary set

pattern In :: forall a. BSP a Source #

pattern Out :: forall a. BSP a Source #

constructBSP :: Clip b v n => (Facet b v n -> c) -> [Facet b v n] -> BSP c Source #

splitWith :: (a -> (Maybe a, Maybe a)) -> [a] -> ([a], [a]) Source #

prettyBSP :: Ord f => BSP f -> IO () Source #

Pretty print BSP tree to stdout.

renderH :: (Doc -> Doc) -> Context k -> BSP k -> Doc Source #

Render BSP into a horizontal tree with a given context.

denormalizeBSP :: Ord n => BSP n -> (BSP Int, IntMap n) Source #

Denormalize BSP with integers at nodes and IntMap of values.