We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Are there any plans to add a multiset implementation? A multiset is an ordered set where multiple keys with equivalent values are allowed.
The text was updated successfully, but these errors were encountered:
package main import ( "fmt" "github.com/emirpasic/gods/sets/treeset" ) // IntComparator provides a basic comparison on int func IntComparator(a, b interface{}) int { aAsserted := a.(int) bAsserted := b.(int) if aAsserted >= bAsserted { return 1 } return -1 } func main() { m := treeset.NewWith(IntComparator, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2) // empty (keys are of type int) m.Size() m.Add(2) // 0 fmt.Println(m.String()) m.Add(1) // 0 fmt.Println(m.String()) m.Add(6) // 0 fmt.Println(m.String()) ff := func(index int, value interface{}) bool { if value.(int) == 1 { return true } return false } fmt.Println(m.Find(ff)) fmt.Println(m.Contains(1)) }
Sorry, something went wrong.
No branches or pull requests
Are there any plans to add a multiset implementation? A multiset is an ordered set where multiple keys with equivalent values are allowed.
The text was updated successfully, but these errors were encountered: