Additions to red-black tree and tree map #10

Merged
emirpasic merged 5 commits from treemap_min_max into master 2016-06-12 23:22:12 +00:00
emirpasic commented 2016-06-12 23:20:53 +00:00 (Migrated from github.com)

Done:

  • Added Min() and Max() functions to tree map.
  • Added Left(), Right(), Floor() and Ceiling() functions to red-black tree (response to an older PR).
  • Tests and documentation update for the above.

@vlad-alexandru-ionescu Changes with respect to #6:

  • Changed the naming for the tree map from "left/right" to "min/max". Kept the "left/right" naming in the red-black tree.
  • Left() and Right() red-black tree functions return nodes rather than keys.
  • Min() and Max() tree map functions return key,value pair rather than only the key.

@otnt #4 Your ceiling and floor functions are now part of the core lib.

@huydx #2 Left() and Right() are functions you were looking for to get min and max nodes.

Futher extending the red-black tree is possible, see example. Sorry guys for taking this long, needed some time to overcome my fear of feature creeping.

Done: - Added Min() and Max() functions to tree map. - Added Left(), Right(), Floor() and Ceiling() functions to red-black tree (response to an older PR). - Tests and documentation update for the above. @vlad-alexandru-ionescu Changes with respect to #6: - Changed the naming for the tree map from "left/right" to "min/max". Kept the "left/right" naming in the red-black tree. - Left() and Right() red-black tree functions return nodes rather than keys. - Min() and Max() tree map functions return key,value pair rather than only the key. @otnt #4 Your ceiling and floor functions are now part of the core lib. @huydx #2 Left() and Right() are functions you were looking for to get min and max nodes. Futher extending the red-black tree is possible, see [example](https://github.com/emirpasic/gods/blob/master/examples/redblacktreeextended.go). Sorry guys for taking this long, needed some time to overcome my fear of feature creeping.
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
golibs/gms-gods!10
No description provided.