Skip to content

Commit

Permalink
renaming the lower envelope modules
Browse files Browse the repository at this point in the history
  • Loading branch information
noinia committed May 26, 2024
1 parent d65384e commit 5b06efa
Show file tree
Hide file tree
Showing 19 changed files with 83 additions and 51 deletions.
22 changes: 11 additions & 11 deletions hgeometry/hgeometry.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -392,11 +392,11 @@ library
HGeometry.LineSegment.Intersection.Naive
HGeometry.LineSegment.Intersection.BentleyOttmann

HGeometry.LowerEnvelope
HGeometry.LowerEnvelope.Naive
HGeometry.LowerEnvelope.VertexForm
HGeometry.LowerEnvelope.AdjListForm
HGeometry.LowerEnvelope.Connected
HGeometry.Plane.LowerEnvelope
HGeometry.Plane.LowerEnvelope.Naive
HGeometry.Plane.LowerEnvelope.VertexForm
HGeometry.Plane.LowerEnvelope.AdjListForm
HGeometry.Plane.LowerEnvelope.Connected


HGeometry.VoronoiDiagram
Expand Down Expand Up @@ -427,14 +427,14 @@ library

HGeometry.LineSegment.Intersection.Types

HGeometry.LowerEnvelope.Type
HGeometry.LowerEnvelope.Connected.Type
HGeometry.LowerEnvelope.Connected.FromVertexForm
-- HGeometry.LowerEnvelope.Sample
HGeometry.Plane.LowerEnvelope.Type
HGeometry.Plane.LowerEnvelope.Connected.Type
HGeometry.Plane.LowerEnvelope.Connected.FromVertexForm
-- HGeometry.Plane.LowerEnvelope.Sample


-- HGeometry.LowerEnvelope.AtMostThree
-- HGeometry.LowerEnvelope.Triangulate
-- HGeometry.Plane.LowerEnvelope.AtMostThree
-- HGeometry.Plane.LowerEnvelope.Triangulate

HGeometry.VoronoiDiagram.ViaLowerEnvelope

Expand Down
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
--------------------------------------------------------------------------------
-- |
-- Module : HGeometry.LowerEnvelope
-- Module : HGeometry.Plane.LowerEnvelope
-- Copyright : (C) Frank Staals
-- License : see the LICENSE file
-- Maintainer : Frank Staals
--
-- Computing the lower envelope of a set of planes
--
--------------------------------------------------------------------------------
module HGeometry.LowerEnvelope
( module HGeometry.LowerEnvelope.Naive
, module HGeometry.LowerEnvelope.Type
-- , module HGeometry.LowerEnvelope.Naive
module HGeometry.Plane.LowerEnvelope
( module HGeometry.Plane.LowerEnvelope.Naive
, module HGeometry.Plane.LowerEnvelope.Type
-- , module HGeometry.Plane.LowerEnvelope.Naive
) where

import HGeometry.LowerEnvelope.Naive
import HGeometry.LowerEnvelope.Type
import HGeometry.Plane.LowerEnvelope.Naive
import HGeometry.Plane.LowerEnvelope.Type


--------------------------------------------------------------------------------
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{-# LANGUAGE UndecidableInstances #-}
--------------------------------------------------------------------------------
-- |
-- Module : HGeometry.LowerEnvelope.AdjListForm
-- Module : HGeometry.Plane.LowerEnvelope.AdjListForm
-- Copyright : (C) Frank Staals
-- License : see the LICENSE file
-- Maintainer : Frank Staals
Expand All @@ -10,7 +10,7 @@
-- form.
--
--------------------------------------------------------------------------------
module HGeometry.LowerEnvelope.AdjListForm
module HGeometry.Plane.LowerEnvelope.AdjListForm
( LowerEnvelope(..)
, LowerEnvelope'(LowerEnvelope)
, ParallelPlane
Expand Down Expand Up @@ -45,9 +45,9 @@ import HGeometry.Algorithms.DivideAndConquer
import HGeometry.HyperPlane.Class
import HGeometry.HyperPlane.NonVertical
import HGeometry.Line.LineEQ
import HGeometry.LowerEnvelope.Connected
import HGeometry.LowerEnvelope.VertexForm (IntersectionLine(..), intersectionLine)
import qualified HGeometry.LowerEnvelope.VertexForm as VertexForm
import HGeometry.Plane.LowerEnvelope.Connected
import HGeometry.Plane.LowerEnvelope.VertexForm (IntersectionLine(..), intersectionLine)
import qualified HGeometry.Plane.LowerEnvelope.VertexForm as VertexForm
import HGeometry.Point
import HGeometry.Properties
import HGeometry.Vector.NonEmpty.Util ()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
-- form.
--
--------------------------------------------------------------------------------
module HGeometry.LowerEnvelope.Connected
module HGeometry.Plane.LowerEnvelope.Connected
( LowerEnvelope'(LowerEnvelope)
, theUnboundedVertex, boundedVertices

Expand All @@ -28,9 +28,9 @@ module HGeometry.LowerEnvelope.Connected
, projectedEdgeGeometries, projectedEdgeGeometry
) where

import HGeometry.LowerEnvelope.Type
import HGeometry.LowerEnvelope.Connected.Type
import HGeometry.LowerEnvelope.Connected.FromVertexForm
import HGeometry.Plane.LowerEnvelope.Type
import HGeometry.Plane.LowerEnvelope.Connected.Type
import HGeometry.Plane.LowerEnvelope.Connected.FromVertexForm
import HGeometry.Vector.NonEmpty.Util ()


Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{-# LANGUAGE UndecidableInstances #-}
--------------------------------------------------------------------------------
-- |
-- Module : HGeometry.LowerEnvelope.FromVertexForm
-- Module : HGeometry.Plane.LowerEnvelope.FromVertexForm
-- Copyright : (C) Frank Staals
-- License : see the LICENSE file
-- Maintainer : Frank Staals
Expand All @@ -10,7 +10,7 @@
-- form.
--
--------------------------------------------------------------------------------
module HGeometry.LowerEnvelope.Connected.FromVertexForm
module HGeometry.Plane.LowerEnvelope.Connected.FromVertexForm
( fromVertexForm'
) where

Expand All @@ -33,9 +33,9 @@ import HGeometry.Foldable.Sort
import HGeometry.Foldable.Util
import HGeometry.HyperPlane.NonVertical
import HGeometry.Line
import HGeometry.LowerEnvelope.Connected.Type
import HGeometry.LowerEnvelope.Type
import qualified HGeometry.LowerEnvelope.VertexForm as VertexForm
import HGeometry.Plane.LowerEnvelope.Connected.Type
import HGeometry.Plane.LowerEnvelope.Type
import qualified HGeometry.Plane.LowerEnvelope.VertexForm as VertexForm
import HGeometry.Point
import HGeometry.Properties
import HGeometry.Vector
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{-# LANGUAGE UndecidableInstances #-}
--------------------------------------------------------------------------------
-- |
-- Module : HGeometry.LowerEnvelope.Connected.Type
-- Module : HGeometry.Plane.LowerEnvelope.Connected.Type
-- Copyright : (C) Frank Staals
-- License : see the LICENSE file
-- Maintainer : Frank Staals
Expand All @@ -10,7 +10,7 @@
-- form.
--
--------------------------------------------------------------------------------
module HGeometry.LowerEnvelope.Connected.Type
module HGeometry.Plane.LowerEnvelope.Connected.Type
( LowerEnvelope'(LowerEnvelope)
, theUnboundedVertex, boundedVertices
, traverseLowerEnvelope
Expand Down Expand Up @@ -57,9 +57,9 @@ import HGeometry.HyperPlane.Class
import HGeometry.HyperPlane.NonVertical
import HGeometry.Line
import HGeometry.LineSegment
import HGeometry.LowerEnvelope.Type
import HGeometry.LowerEnvelope.VertexForm (IntersectionLine(..),intersectionLine)
import qualified HGeometry.LowerEnvelope.VertexForm as VertexForm
import HGeometry.Plane.LowerEnvelope.Type
import HGeometry.Plane.LowerEnvelope.VertexForm (IntersectionLine(..),intersectionLine)
import qualified HGeometry.Plane.LowerEnvelope.VertexForm as VertexForm
import HGeometry.Point
import HGeometry.Properties
import HGeometry.Vector
Expand Down
32 changes: 32 additions & 0 deletions hgeometry/src/HGeometry/Plane/LowerEnvelope/EpsApproximation.hs
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
module HGeometry.LowerEnvelope.EpsApproximation
(

) where

import Control.Monad.State.Class
import HGeometry.HyperPlane.Class
import HGeometry.HyperPlane.NonVertical
import System.Random.Stateful
import Witherable

--------------------------------------------------------------------------------

-- | Given a value r, and a set of planes H, we construct a C/r-approximation A of H w.r.t
-- the shallow downward ranges.
epsApproximation :: ( Plane_ plane r
, Ord r, Fractional r, Foldable f, Functor f, Ord plane
)
=> Int -- ^ the parameter r
-> f plane -> f plane
epsApproximation = undefined

-- | Given a value r, and a set of planes H, we construct a C/r-approximation A of H w.r.t
-- the shallow downward ranges.
epsApproximation' :: ( Plane_ plane r
, Ord r, Fractional r, Foldable f, Functor f, Ord plane
, RandomGen gen, MonadState gen m
, Show plane, Show r
)
=> Int -- ^ the parameter r
-> f plane -> m (f plane)
epsApproximation' r hs = undefined
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{-# LANGUAGE UndecidableInstances #-}
module HGeometry.LowerEnvelope.Naive
module HGeometry.Plane.LowerEnvelope.Naive
( lowerEnvelope
, lowerEnvelopeVertexForm
-- , triangulatedLowerEnvelope
Expand All @@ -16,8 +16,8 @@ import qualified Data.Set as Set
import HGeometry.Combinatorial.Util
import HGeometry.HyperPlane.Class
import HGeometry.HyperPlane.NonVertical
import HGeometry.LowerEnvelope.AdjListForm (LowerEnvelope, fromVertexForm)
import HGeometry.LowerEnvelope.VertexForm
import HGeometry.Plane.LowerEnvelope.AdjListForm (LowerEnvelope, fromVertexForm)
import HGeometry.Plane.LowerEnvelope.VertexForm
import HGeometry.Point

--------------------------------------------------------------------------------
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{-# LANGUAGE UndecidableInstances #-}
module HGeometry.LowerEnvelope.Type
module HGeometry.Plane.LowerEnvelope.Type
( VertexID
, BoundedVertexF(Vertex)
, location, definers, location2, incidentEdgesB
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{-# LANGUAGE UndecidableInstances #-}
--------------------------------------------------------------------------------
-- |
-- Module : HGeometry.LowerEnvelope.VertexForm
-- Module : HGeometry.Plane.LowerEnvelope.VertexForm
-- Copyright : (C) Frank Staals
-- License : see the LICENSE file
-- Maintainer : Frank Staals
Expand All @@ -10,7 +10,7 @@
-- i.e. storing only the vertices.
--
--------------------------------------------------------------------------------
module HGeometry.LowerEnvelope.VertexForm
module HGeometry.Plane.LowerEnvelope.VertexForm
( VertexForm(VertexForm)
, hasVertices, vertices'
, singleton
Expand All @@ -31,7 +31,7 @@ import HGeometry.Combinatorial.Util
import HGeometry.HyperPlane.NonVertical
import HGeometry.Intersection
import HGeometry.Line
import HGeometry.LowerEnvelope.Type
import HGeometry.Plane.LowerEnvelope.Type
import HGeometry.Point
import HGeometry.Properties
import Hiraffe.Graph
Expand Down
6 changes: 3 additions & 3 deletions hgeometry/src/HGeometry/VoronoiDiagram/ViaLowerEnvelope.hs
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,9 @@ import HGeometry.Duality
import HGeometry.Ext
import HGeometry.HyperPlane.Class
import HGeometry.HyperPlane.NonVertical
import HGeometry.LowerEnvelope.AdjListForm
import HGeometry.LowerEnvelope.Naive (lowerEnvelopeVertexForm)
import HGeometry.LowerEnvelope.VertexForm (VertexForm, vertices')
import HGeometry.Plane.LowerEnvelope.AdjListForm
import HGeometry.Plane.LowerEnvelope.Naive (lowerEnvelopeVertexForm)
import HGeometry.Plane.LowerEnvelope.VertexForm (VertexForm, vertices')
import HGeometry.Point
import HGeometry.Properties

Expand Down
4 changes: 2 additions & 2 deletions hgeometry/test-with-ipe/test/VoronoiDiagram/VoronoiSpec.hs
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ import HGeometry.Duality
import HGeometry.Ext
import HGeometry.HyperPlane.Class
import HGeometry.HyperPlane.NonVertical
import HGeometry.LowerEnvelope
import HGeometry.LowerEnvelope.AdjListForm
import HGeometry.Plane.LowerEnvelope
import HGeometry.Plane.LowerEnvelope.AdjListForm
import qualified Data.Set as Set
import qualified Data.List.NonEmpty as NonEmpty
import qualified Data.Sequence as Seq
Expand Down
4 changes: 2 additions & 2 deletions hgeometry/test/LowerEnvelope/NaiveSpec.hs
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ import HGeometry.Combinatorial.Util
import HGeometry.HyperPlane.Class
import HGeometry.HyperPlane.NonVertical
import HGeometry.Instances ()
import HGeometry.LowerEnvelope
import HGeometry.LowerEnvelope.VertexForm
import HGeometry.Plane.LowerEnvelope
import HGeometry.Plane.LowerEnvelope.VertexForm
import HGeometry.Number.Real.Rational
import HGeometry.Point
import HGeometry.Vector
Expand Down

0 comments on commit 5b06efa

Please sign in to comment.