Commit Graph

35 Commits

Author SHA1 Message Date
534f0f9609
Add getSquareByZipper function 2014-11-14 21:26:02 +01:00
76afaae38e
ALGO: export constructors and Zipper in RangeSearch 2014-11-14 21:25:25 +01:00
af2e1b59cd
ALGO: add missing Show instances to RangeSearch 2014-11-14 21:24:14 +01:00
62d7c9ffcd
ALGO: implement the quad tree 2014-11-13 23:05:56 +01:00
c765c63125
POLYINT: run rmdups only once 2014-10-31 17:49:08 +01:00
61e0063d78
POLYINT: fix comparison for different-length polygons 2014-10-28 18:51:11 +01:00
d81b6b1cec
POLYINT: improve haddock doc 2014-10-26 14:58:43 +01:00
c8914c8272
POLYINT: small refactor
Get predecessors and successors in the beginning instead of
figuring them out for every single point separetely.
This is still O(n), butt should be a lot quicker than the previous
approach.
2014-10-26 04:22:05 +01:00
fd931db7e0
Improve readability 2014-10-25 20:39:34 +02:00
c4c397e12f
POLYINT: small refactor, abstract some stuff out 2014-10-25 20:23:34 +02:00
7965443aa6
Fix example mesh 2014-10-25 03:15:00 +02:00
9a101d68a5
POLYINT: first try of polygon intersection algorithm in O(n) 2014-10-25 01:44:13 +02:00
a31e1ff578
ALGO: improve haddock doc 2014-10-15 22:50:56 +02:00
077d0442f5
ALGO: improve style 2014-10-13 22:30:19 +02:00
8300929fd7
ALGO: refactor
Move sortedXY to Vector.hs, fix shadowing of scanH.
Simplified grahamCHSteps by making use of a more generalized scanH
function.
2014-10-13 22:06:12 +02:00
edde93ec77
ALGO: improve function names 2014-10-13 19:50:02 +02:00
7cdb867cf4
ALGO: Split scanH out and make the graham API more modular 2014-10-13 19:49:53 +02:00
hasufell
2c1d5fa5ec Improve redability, add docs 2014-10-13 03:25:22 +02:00
87393af71a
Make Gif animation more nice, TODO: IMPROVE CODE 2014-10-13 02:58:18 +02:00
f82c948055
ALGO: Improve readability by introducing notcw 2014-10-12 20:37:24 +02:00
56ea542535
ALGO: fix generation of gif
This is a good guess... the maximum of possible steps shouldn't
be higher than twice the length of the points.
2014-10-12 19:22:37 +02:00
37b38115ae
ALGO: fix algorithm to show collinear points as part of the hull
There was also a bug to be fixed when doing this. We missed
an important pattern match case which casued wrong results.
2014-10-12 19:19:44 +02:00
bfcc9bfdf7
ALGO: improve redability and style, add pseudo code
We also slightly changed the behavior of the algorithm and
now split it at 3 elements. It doesn't matter complexity wise
and improves readability a bit.
2014-10-12 18:44:48 +02:00
cc7efa9906
ALGO: improve style 2014-10-12 03:00:25 +02:00
b75f531533
ALGO: fix grahamGetCHSteps 2014-10-12 03:00:13 +02:00
6dc4fae415
ALGO: improve readability 2014-10-12 02:11:47 +02:00
60f59bb2b7
ALGO: fix the algorithm
It was imprecise before and only worked by accident.
'grahamGetCHSteps' is a bit broken for now and caused duplicates.
2014-10-12 01:54:44 +02:00
6e4c7e47c2
Restructure modules 2014-10-10 17:40:08 +02:00
12da4040dc
Improve overall style and indenting 2014-10-10 00:19:05 +02:00
9c9cb29e45
ALGO: improve style 2014-10-09 17:22:41 +02:00
4877837f93
Fix step depth in grahamGetCHSteps
If we have 3 points and pass 1 to 'g' then 2 steps will be computed.
That means we have to substract 2 from the total length in the call
to 'g'.
2014-10-09 16:11:34 +02:00
a5473eaf96
Fix haddock docs 2014-10-09 03:27:02 +02:00
1fd0b9f27f
Allow generating gifs vor visualizing steps of the graham algo
TODO: this still requires us to hack on Main.hs, because
it isn't compatible with the GUI.
Also see https://github.com/diagrams/diagrams-cairo/issues/55
2014-10-09 03:10:21 +02:00
9b566f2a63
Improve error handling 2014-10-08 22:07:37 +02:00
d8d28d3ca9
Add convex hull algorithm via graham scan 2014-10-08 16:39:46 +02:00