hgeometry
Copyright(C) Frank Staals
Licensesee the LICENSE file
MaintainerFrank Staals
Safe HaskellNone
LanguageGHC2024

HGeometry.Plane.LowerEnvelope.Clipped

Description

A Representation of the Lower envelope of planes inside a given triangle. This means now all regions are actually bounded.

Synopsis

Documentation

type ClippedMinimizationDiagram plane = ClippedMinimizationDiagram' (NumType plane) plane Source #

The representing (the minimization diagram) of the lower envelope of a set of planes, clipped to some bounding triangle.

A ClippedMinimizationDiagram is essentially just a non-empty Map mapping planes to cells.

data ClippedMinimizationDiagram' r plane Source #

Implementatino of the ClippedMinimizationDiagram type; r is the numeric type of the planes

Instances

Instances details
CFunctor (ClippedMinimizationDiagram' r) Source # 
Instance details

Defined in HGeometry.Plane.LowerEnvelope.Clipped.Type

Constrained (ClippedMinimizationDiagram' r) Source # 
Instance details

Defined in HGeometry.Plane.LowerEnvelope.Clipped.Type

(NFData r, NFData plane) => NFData (ClippedMinimizationDiagram' r plane) Source # 
Instance details

Defined in HGeometry.Plane.LowerEnvelope.Clipped.Type

Methods

rnf :: ClippedMinimizationDiagram' r plane -> () #

(Show r, Num r, Show plane) => Show (ClippedMinimizationDiagram' r plane) Source # 
Instance details

Defined in HGeometry.Plane.LowerEnvelope.Clipped.Type

type Dom (ClippedMinimizationDiagram' r) plane Source # 
Instance details

Defined in HGeometry.Plane.LowerEnvelope.Clipped.Type

type Dom (ClippedMinimizationDiagram' r) plane = Ord plane
type Dimension (ClippedMinimizationDiagram' r plane) Source # 
Instance details

Defined in HGeometry.Plane.LowerEnvelope.Clipped.Type

type Dimension (ClippedMinimizationDiagram' r plane) = 2
type NumType (ClippedMinimizationDiagram' r plane) Source # 
Instance details

Defined in HGeometry.Plane.LowerEnvelope.Clipped.Type

type NumType (ClippedMinimizationDiagram' r plane) = r

_ClippedMinimizationDiagramMap :: NumType plane ~ r => Iso' (ClippedMinimizationDiagram plane) (NEMap plane (ClippedMDCell r plane ())) Source #

Get access to the underlying NonEmpty Map

type ClippedMDCell r plane a = ClippedMDCell' r (MDVertex r plane a) Source #

Cells in the Minimization diagram (i.e. the projected lower envelope of planes) parameterized by the numeric type and the planes

type ClippedMDCell' r vertex = ClippedMDCell'' r vertex (Point 2 r) Source #

We mostly use ClippedMDCell'''s where the Extra is just a Point

newtype ClippedMDCell'' (r :: k) vertex extra Source #

Helper type for representing cells in a minimzation diagram. These cells are possibly degenerate convex polygons, whose vertices are either of type vertex or of type 'Point 2 r'.

Constructors

ClippedMDCell (PossiblyDegenerateSimplePolygon (OriginalOrExtra vertex extra) (ClippedBoundedRegion r vertex extra)) 

Instances

Instances details
Bifunctor (ClippedMDCell'' r) Source # 
Instance details

Defined in HGeometry.Plane.LowerEnvelope.Clipped.Type

Methods

bimap :: (a -> b) -> (c -> d) -> ClippedMDCell'' r a c -> ClippedMDCell'' r b d #

first :: (a -> b) -> ClippedMDCell'' r a c -> ClippedMDCell'' r b c #

second :: (b -> c) -> ClippedMDCell'' r a b -> ClippedMDCell'' r a c #

Functor (ClippedMDCell'' r vertex) Source # 
Instance details

Defined in HGeometry.Plane.LowerEnvelope.Clipped.Type

Methods

fmap :: (a -> b) -> ClippedMDCell'' r vertex a -> ClippedMDCell'' r vertex b #

(<$) :: a -> ClippedMDCell'' r vertex b -> ClippedMDCell'' r vertex a #

(NFData vertex, NFData r, NFData extra) => NFData (ClippedMDCell'' r vertex extra) Source # 
Instance details

Defined in HGeometry.Plane.LowerEnvelope.Clipped.Type

Methods

rnf :: ClippedMDCell'' r vertex extra -> () #

(Show vertex, Point_ vertex 2 r, Point_ extra 2 r, Show extra, Show r) => Show (ClippedMDCell'' r vertex extra) Source # 
Instance details

Defined in HGeometry.Plane.LowerEnvelope.Clipped.Type

Methods

showsPrec :: Int -> ClippedMDCell'' r vertex extra -> ShowS #

show :: ClippedMDCell'' r vertex extra -> String #

showList :: [ClippedMDCell'' r vertex extra] -> ShowS #

(Eq vertex, Eq r, Eq extra) => Eq (ClippedMDCell'' r vertex extra) Source # 
Instance details

Defined in HGeometry.Plane.LowerEnvelope.Clipped.Type

Methods

(==) :: ClippedMDCell'' r vertex extra -> ClippedMDCell'' r vertex extra -> Bool #

(/=) :: ClippedMDCell'' r vertex extra -> ClippedMDCell'' r vertex extra -> Bool #

type Dimension (ClippedMDCell'' r vertex extra) Source # 
Instance details

Defined in HGeometry.Plane.LowerEnvelope.Clipped.Type

type Dimension (ClippedMDCell'' r vertex extra) = 2
type NumType (ClippedMDCell'' r vertex extra) Source # 
Instance details

Defined in HGeometry.Plane.LowerEnvelope.Clipped.Type

type NumType (ClippedMDCell'' r vertex extra) = r

lowerEnvelopeIn :: (Plane_ plane r, Ord plane, Ord r, Fractional r, Point_ corner 2 r, Foldable1 set, Show r, Show corner, Show plane) => Triangle corner -> set plane -> ClippedMinimizationDiagram plane Source #

Compute the lower envelope of planes inside a given triangle.

\(O(n^4)\) (as it currently uses the brute force algorithm).

foldMapVertices :: forall {k} m vertex extra (r :: k). Semigroup m => (OriginalOrExtra vertex extra -> m) -> ClippedMDCell'' r vertex extra -> m Source #

Fold a given function over all vertices