
Hi, I wrote a O(n log n) line segment intersection code. Couple of questions 1) I did not find such a library on hackage (at least google gave no results:)), and I notice a lot of people submit packages. Would there be any interest to submit this code (would give incentive to make the code cleaner) 2) In the algo I needed a balanced binary tree, but with a compare function that changes with each iteration. Is there a balanced binary tree available that give more freedom in specifying the compare function. Data.Set does not have this option (I think). Using unsafePerformIO to change the compare function seemed a little bit ugly. -- View this message in context: http://www.nabble.com/line-intersection-code-tp25530313p25530313.html Sent from the Haskell - Haskell-Cafe mailing list archive at Nabble.com.

1) I didn't find one, either :) I Ctrl+F-ed hackage for "geometry",
"segment" and "range".
2) btw, that's yet another good reason to have reified typeclass
dictionaries. I wonder why Haskell does not support them yet.
Looks like http://hackage.haskell.org/package/AvlTree might fit your
need, or probably a variation on
http://hackage.haskell.org/package/fingertree .
2009/9/21 staafmeister
Hi,
I wrote a O(n log n) line segment intersection code. Couple of questions
1) I did not find such a library on hackage (at least google gave no results:)), and I notice a lot of people submit packages. Would there be any interest to submit this code (would give incentive to make the code cleaner)
2) In the algo I needed a balanced binary tree, but with a compare function that changes with each iteration. Is there a balanced binary tree available that give more freedom in specifying the compare function. Data.Set does not have this option (I think). Using unsafePerformIO to change the compare function seemed a little bit ugly.
-- View this message in context: http://www.nabble.com/line-intersection-code-tp25530313p25530313.html Sent from the Haskell - Haskell-Cafe mailing list archive at Nabble.com.
_______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
-- Eugene Kirpichov Web IR developer, market.yandex.ru

staafmeister wrote:
Hi,
I wrote a O(n log n) line segment intersection code. Couple of questions
1) I did not find such a library on hackage (at least google gave no results:)), and I notice a lot of people submit packages. Would there be any interest to submit this code (would give incentive to make the code cleaner)
Yea I'd probably use it. Small packages like that are kinda nice.

Posting small packages like that on Hackage is a good way for others to learn Haskell. Is a record kept of suggested changes on Hackage? -- Regards, Casey
participants (4)
-
Casey Hawthorne
-
Eugene Kirpichov
-
Neal Alexander
-
staafmeister