Skip to content

Commit

Permalink
updated readme + a version that works with ghc 9.8
Browse files Browse the repository at this point in the history
  • Loading branch information
noinia committed Feb 10, 2024
1 parent 3e7ebd0 commit 1ba229e
Show file tree
Hide file tree
Showing 2 changed files with 41 additions and 13 deletions.
43 changes: 31 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,31 +79,50 @@ using the library.

# Available Geometric Algorithms and Data Structures

This is a brief overview of the main available algorithms in
HGeometry. Refer to the haddocks for more details.
This is a brief overview of some of the main available algorithms in
HGeometry. Refer to the haddocks for more details. HGeometry contains
algorithms for computing

* Convex hull algorithms for $n$ points in $\mathbb{R}^2$
* the *convex hull* of $n$ points in $\mathbb{R}^2$. In particular,

- worst case optimal $O(n\log n)$ time implementations of Graham
scan, Divide and Conquer,
scan and Divide and Conquer,
- an output sensitive $O(nh)$ time Jarvis March, and
- a QuickHull implementation (which has worst case complexity $O(n^2)$)

* Closest Pair algorithms for $n$ points in $\mathbb{R}^2$
Furtheremore, an optimal linear time algorithm for when the points
are the vertices of a convex polygon.

* the *closest pair* among $n$ points in $\mathbb{R}^2$

- $O(n\log n)$ time using divide and conquer

* Point in polygon tests (in linear time for simple polygons, and in
$O(\log n)$ time for convex polygons.).
* the *intersections* among a set of $n$ line segments in
$\mathbb{R}^2$.

- The algorithm runs in $O((n+k)\log n)$ time, where
$k$ is the output size.
- Alternatively, one can of course also compute all intersections in
$O(n^2)$ time (which may be better if $k$ is large).

* the *Minkowski sum* of two convex polygons. The algorithm runs in
optimal $O(n+m)$ time, where $n$ and $m$ are the sizes of the polygons.

* if a *point lies in a polygon*. In particular,

- in linear time for simple polygons, and
- in $O(\log n)$ time for convex polygons.

* Finding tangents and extremal points with respect to a polygon
* *tangents* and *extremal points* in a polygon In particular,

- $O(\log n)$ time for convex polygons, and
- linear time in case of simple polygons.
- in $O(\log n)$ time for convex polygons, and
- in linear time in simple polygons.

* Tangent finding algorithms (linear time for simple polygons and
$O(\log n)$ time for convex polygons).
* a *simplification of a polyline*. In particular, an implementation
of

- the Imai-Iri algorithm, and
- the well-known Douglas Peucker algorithm.

HGeometry also contains an implementation of some geometric data
structures. In particular,
Expand Down
11 changes: 10 additions & 1 deletion cabal.project
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ allow-newer:
vector-circular:base,
vector-circular:template-haskell,
vector-circular:semigroupoids,
miso:servant,
-- miso:servant,
servant-lucid:servant,
lucid-svg:transformers,text,
pretty:deepseq,
Expand Down Expand Up @@ -47,3 +47,12 @@ source-repository-package
location: git@github.com:noinia/jsaddle.git
subdir: jsaddle
tag: e034fd40cd07c23ad85f3b059e8e3d8b698e322a

source-repository-package
type: git
location: git@github.com:noinia/miso.git
tag: 1d16ba220bcd6be28d1e89d141330cd6875c70ff


package miso
flags: +jsaddle

0 comments on commit 1ba229e

Please sign in to comment.