Commit Graph

95 Commits

Author SHA1 Message Date
Emir Pasic
d6611c11d3 - getting rid of min/max from avl tree for now, until we figure out if these should be implemented on all trees (probably, yes) 2017-03-05 21:09:28 +01:00
Emir Pasic
31294e57de - remove copy-constructor like initialization in avl tree, could be ambiguous for clients of what the output might be. an explicit initialization with explicit comparator is a lot more obvious, more code, but more obvious. 2017-03-05 21:04:53 +01:00
Emir Pasic
59734f8164 - avl tree: expose children and parent nodes, can be useful when extending structure to have access to these 2017-03-05 21:03:01 +01:00
Emir Pasic
f480e9419a - simplify avl tree by exposing its comparator , i.e. del getter for comparator 2017-03-05 20:57:53 +01:00
Emir Pasic
6f20e11a99 - remove logging and panics from avl tree 2017-03-05 20:54:33 +01:00
Emir Pasic
dbba07eb57 - go fmt/vet 2017-03-05 20:50:19 +01:00
Emir Pasic
6c67eb0b06 - revert some of changes coming from avl tree merge 2017-03-05 20:48:18 +01:00
Emir Pasic
b5004c7e71 - fix import path 2017-03-05 20:48:04 +01:00
Emir Pasic
cac4f90f91 - move license of avl tree to root's license 2017-03-05 20:41:29 +01:00
Benjamin Scher Purcell
38b9436208 fix tests 2017-02-26 21:45:46 -06:00
Benjamin Scher Purcell
c49ab09dea fix more travis issues 2017-02-26 21:18:37 -06:00
Benjamin Scher Purcell
b8c9d1188f fix travis errors 2017-02-26 21:00:43 -06:00
Benjamin Scher Purcell
5507a9ec4d Revert "fix import paths back to emirpasic" The paths have to point to spewspews for the build to succeed
This reverts commit 6da2e38be5.
2017-02-26 20:30:24 -06:00
Benjamin Scher Purcell
6da2e38be5 fix import paths back to emirpasic 2017-02-26 20:20:24 -06:00
Benjamin Scher Purcell
dfbd06908b fix golint issues 2017-02-26 20:14:08 -06:00
Benjamin Scher Purcell
0e4eb1c32c convert treemap in the same way as treeset 2017-02-26 20:10:35 -06:00
Benjamin Scher Purcell
67a0d2f547 Make treeset take an interface, make the trees satisfy that interface 2017-02-26 19:46:04 -06:00
Benjamin Scher Purcell
d84c1f0a42 fix documentation 2017-02-26 18:52:00 -06:00
Benjamin Scher Purcell
2339521ad9 put tests back 2017-02-26 18:49:18 -06:00
Benjamin Scher Purcell
d43b189795 add random put and remove 2017-02-26 13:37:01 -06:00
Benjamin Scher Purcell
64f44f66bc more tests, revise existing tests 2017-02-26 13:12:51 -06:00
Benjamin Scher Purcell
e3980e5b80 add avl implementation 2017-02-25 14:29:26 -06:00
Emir Pasic
4ea857183a - optimization to bulk insert into heap as per @cristaloleg suggestion #32 2016-09-07 03:51:19 +02:00
Emir Pasic
196706bb29 - set key to key if direct match when inserting into red-black tree. fixes the issue when the key is a struct type, which is how treeset uses the red-black tree #31 2016-09-07 03:19:20 +02:00
Emir Pasic
0790df9fd0 - errcheck 2016-08-07 01:54:22 +02:00
Emir Pasic
efcbbe6274 - detailed extensive tests with breakdown on number of elements 2016-07-16 04:40:16 +02:00
Emir Pasic
b38c99bf33 - btree deletion fixes with more tests (done) 2016-07-14 08:28:11 +02:00
Emir Pasic
288c1a4ca3 - btree deletion with tests 2016-07-14 05:55:24 +02:00
Emir Pasic
eb4171fdb0 - btree Keys() and Values() implemented with tests (using iterator) 2016-07-12 03:05:00 +02:00
Emir Pasic
53898058bb - btree iterator implemented with tests 2016-07-12 02:53:48 +02:00
Emir Pasic
76711f5b71 - btree don't allow order less than 3
- btree Left(), Right(), LeftKey(), RightKey(), LeftValue(), RightValue() implementation with tests
2016-07-11 02:28:14 +02:00
Emir Pasic
4e3ff20469 - btree get and put tests 2016-07-11 01:00:52 +02:00
Emir Pasic
9663093961 - btree put fixes 2016-07-11 00:18:00 +02:00
Emir Pasic
2df9ce1ab5 - btree put fixes 2016-07-10 22:03:59 +02:00
Emir Pasic
eecaef5625 - btree Height() and String() implementations 2016-07-10 05:16:02 +02:00
Emir Pasic
ab73314ad4 - btree expose its root, nodes and entries (for extension purposes) 2016-07-09 04:13:51 +02:00
Emir Pasic
19bf8e5c15 - remove inOrder function in red-black tree and use iterator 2016-07-09 04:10:02 +02:00
Emir Pasic
28b826151a - btree insertion with tests 2016-07-09 03:57:27 +02:00
Emir Pasic
9563b15010 - btree insertion with tests 2016-07-09 03:57:18 +02:00
Emir Pasic
213367f1ca - replace long bsd text with short in all .go files 2016-06-27 04:21:09 +02:00
Emir Pasic
20229603ab - refactor all iterators and enumerables into separate files 2016-06-27 04:02:52 +02:00
Emir Pasic
02f40db0cf - test iterator end on reverse-iterable data structures
- fix red-black tree
2016-06-27 02:42:05 +02:00
Emir Pasic
f052c96069 - iterator end on reverse-iterable data structures 2016-06-27 00:41:32 +02:00
Emir Pasic
57162feff5 - rename Reset() to Begin() in iterators (this will allow End() which will make reverse loops more readable) 2016-06-27 00:08:01 +02:00
Emir Pasic
cbc23a5b79 - test iterator first on all iterable data structures 2016-06-26 23:58:23 +02:00
Emir Pasic
bdfeab4912 - iterator first on all structures with reversible iterators 2016-06-26 22:50:14 +02:00
Emir Pasic
3d1014bf63 - test iterator last on all structures with reversible iterators 2016-06-26 22:40:49 +02:00
Emir Pasic
f8b0747409 - iterator last on all structures with reversible iterators 2016-06-26 22:27:08 +02:00
Emir Pasic
3a938233a0 - test iterator reset on all structures 2016-06-26 21:44:23 +02:00
Emir Pasic
b86d413e66 - iterator reset on all structures 2016-06-26 20:50:49 +02:00