Repository navigation
Releases
Releases · 0xShady/fancy-tree
v2.0.0
Highlights
- No more editing the header: name your node's fields with
FANCY_TREE_LEFT,FANCY_TREE_RIGHTandFANCY_TREE_VALUEbefore the include, and any printable value type works. - Red/black colouring for red-black trees (
FANCY_TREE_COLOR,FANCY_TREE_RED). print_dotwrites the tree for Graphviz, for trees too big for the terminal.
Upgrading from v1.0.0 (breaking)
fancy_tree<Node>is nowfancy::tree<Node>.V_VIEW/H_VIEWare nowfancy::V_VIEW/fancy::H_VIEW.- Remove your edits to
fancy_tree.hpp(theNODE,LEFT,RIGHT,CONTENTmacros and the include) and use theFANCY_TREE_*macros above instead.
What's Changed
- Use fancy_tree without editing the header by @0xShady in #4
- Fix horizontal view leak and support any printable value by @0xShady in #5
- Add Makefile, output tests, CI and license, refresh the README by @0xShady in #6
- feat!: put the tree printer and its flags in a namespace by @0xShady in #9
- docs: record a new sample gif by @0xShady in #10
- feat: red/black colouring for red-black trees by @0xShady in #13
- feat: DOT export for Graphviz by @0xShady in #14
New Contributors
Full Changelog: v1.0.0...v2.0.0
v1.0.0
The original fancy-tree from July 2022, tagged after the fact.
- Prints a binary tree in the terminal, vertically (root on top) or horizontally (root on the left).
- Templated on the node type. To use it, edit
fancy_tree.hpp: include your node's header and set theNODE,LEFT,RIGHTandCONTENTmacros. - Use it with
fancy_tree<Node<int> >and theV_VIEW/H_VIEWflags.
Code written against these names keeps working until v2.0.0, which moves them into the fancy namespace.