bintreeviz v0.1.0 API Reference
Modules
Bintreeviz is a binary tree visualizer for Elixir. Its main purpose is to convert a given tree structure into a string representation.
Bintreeviz.Node describes a single Node in the graph and contains the functions to manipulate said Nodes.
Bintreeviz.Positioner describes the behaviour for implementing a positioner. Out of the box Bintreeviz will provide the WS implementation. Implementing another positioner is as easy as providing a module with a position/1
function which will take the root node and returns the fully positioned root node.
Module to do the positioning following the WS algorithm. As described in the original paper, this algorithm works with two loops to keep the algorithm performing in O(N).
Bintreeviz.Renderer describes the behaviour for implementing a renderer. Out of the box Bintreeviz will provide a ASCII renderer which will turn the provided graph into a stringified representation using configurable box drawing characters.
Simple ASCII rendering module which, given a tree structure, render its nodes to STDOUT using ASCII characters such as dashes and pipes. Its implemented quite naively but we'll fix that in a next iteration.
Bintreeviz.Renderer.Ascii.Charset describes the behaviour to define various charsets to be used to draw the trees.
BoxDrawingChars defines the characters to use for drawing tidy boxes following the Box Drawing Characters
SimpleDrawingChars defines the characters to use for drawing simple boxes with dashes, pipes and plus signs.