Is this new set a union of sets or does this new set hold a group of sets?

A simple solution would be to write a Union function that takes a group of

sets and returns a new set. A utility library used to manage the sets could

be as simple or as complex as you'd like, but should include the basics

like insert, delete, contains, union, difference.

The newest hot potato is hashing but this could be done a variety of ways,

if the set is static then a very efficient implementation could be written

with an array or slice using heap/btree techniques, or if its dynamic set

the implementation could use a pointer style list, heap, b tree, avl tree,

etc.

On Friday, August 22, 2014 3:09:43 PM UTC-4, Dean Schulze wrote:A Map with boolean values can be used as a Set provided that your keys

have an equality operator

http://golang.org/doc/effective_go.html#mapsI need to create a Set of Sets so a Map won't work because it lacks an

equality operator.

Is there a way to create a Set of Sets using built ins?

--

You received this message because you are subscribed to the Google Groups "golang-nuts" group.

To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscribe@googlegroups.com.

For more options, visit

https://groups.google.com/d/optout.