go-datastructures
go-datastructures copied to clipboard
A collection of useful, performant, and threadsafe Go datastructures.
If I have a rtree where I insert 50 rectangles and change the coordinates/dimensions of some rectangles afterwards, will rtree recognize this and adapt the internal data structure to work...
I tried New(100,2) for a tree managing 2D rectangles. But that failed... I used New(100,3) which works but I don't know why. So, what does this parameter specify? And if...
As per documentation, `rb.Offer` should return false only when the queue is full: ``` // Offer adds the provided item to the queue if there is space. If the queue...
Dependabot, a solution for automatic package updates, is being enabled on all production repositories to aid in vulnerability management. This is an automated PR which has taken a best-guess approach...
Some additional methods for working with queue. Thats useful, when you need interact with queue items (send stop signal and clear queue) - GetItems - getting all items for scan...
``` // Get returns the value for the associated key or returns nil if the // key does not exist. func (d *Dtrie) Get(key interface{}) interface{} { return get(d.root, d.hasher(key),...
Tested on v1.0.50: From the documentation, it sounds like the dtrie is intended to be an immutable, [hash array mapped trie][initial-pr] implementation: > Dtrie > A persistent hash trie that...
$uname -a Linux Lee-Ubuntu 4.4.0-28-generic #47-Ubuntu SMP Fri Jun 24 10:09:13 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux $cat /etc/issue Linux Lee-Ubuntu 4.4.0-28-generic #47-Ubuntu SMP Fri Jun 24 10:09:13 UTC 2016...
this test will fail ``` func TestTrieSuccessorBigGaps(t *testing.T) { yfast := New(uint64(0)) e3 := newMockEntry(13
q := queue.NewPriorityQueue(1, true) q.Put(buffersItem{data, priority}) result, err := q.Get(1)