[Haskell-cafe] Set (Set a) like container - but more efficient?

16 views
Skip to first unread message

Marc Weber

unread,
Aug 23, 2014, 6:42:20 AM8/23/14
to haskell-cafe
Does a Set (Set a) like container exist already but which is represented
as tree internally, eg

A
` - B - C
` - D
` - X - Y

which would represent ABC ABD and AXY ? If it does not what would be a
nice name to create such container?

Marc Weber
_______________________________________________
Haskell-Cafe mailing list
Haskel...@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe

Ivan Lazar Miljenovic

unread,
Aug 23, 2014, 6:47:06 AM8/23/14
to Marc Weber, haskell-cafe
Sounds a bit like a Trie...
--
Ivan Lazar Miljenovic
Ivan.Mi...@gmail.com
http://IvanMiljenovic.wordpress.com

Johannes Waldmann

unread,
Sep 1, 2014, 7:14:21 AM9/1/14
to haskel...@haskell.org
Marc Weber <marco-oweber <at> gmx.de> writes:

> Does a Set (Set a) like container exist [...]

what do you want to do with this?
In particular, what methods of the outer set are you planning to use?

Do you perhaps want a disjoint-set representation?
http://stackoverflow.com/questions/15691696/equivalence-classes-and-union-find-in-a-functional-language

- J.W.

Marc Weber

unread,
Sep 1, 2014, 7:41:02 AM9/1/14
to haskell-cafe
Excerpts from Johannes Waldmann's message of Mon Sep 01 11:13:56 +0000 2014:
It turned out that the tree was that small that there was no need to
optimize the representation - thus using Set (Set a) was just good
enough.

Marc Weber
Reply all
Reply to author
Forward
0 new messages