mirror of
https://github.com/arnaucube/arbo.git
synced 2026-01-15 01:41:28 +01:00
Add AddBatch CaseD
CASE D: Already populated Tree
==============================
- Use A, B, C, D as subtree
- Sort the Keys in Buckets that share the initial part of the path
- For each subtree add there the new leafs
R
/ \
/ \
/ \
* *
/ | / \
/ | / \
/ | / \
L: A B C D
/\ /\ / \ / \
... ... ... ... ... ...
This commit is contained in:
@@ -219,6 +219,13 @@ func TestAux(t *testing.T) { // TODO split in proper tests
|
||||
k = BigIntToBytes(big.NewInt(int64(770)))
|
||||
err = tree.Add(k, v)
|
||||
c.Assert(err, qt.IsNil)
|
||||
|
||||
k = BigIntToBytes(big.NewInt(int64(388)))
|
||||
err = tree.Add(k, v)
|
||||
c.Assert(err, qt.IsNil)
|
||||
k = BigIntToBytes(big.NewInt(int64(900)))
|
||||
err = tree.Add(k, v)
|
||||
c.Assert(err, qt.IsNil)
|
||||
//
|
||||
// err = tree.PrintGraphviz(nil)
|
||||
// c.Assert(err, qt.IsNil)
|
||||
|
||||
Reference in New Issue
Block a user