# Treeviz

### From HaskellWiki

(Initial revision.) |
m (→ToDo: Removed the "split code..." ToDo item.) |
||

(5 intermediate revisions by one user not shown) | |||

Line 4: | Line 4: | ||

This library can assist you in visualizing how computation is broken down, or decomposed, by certain ''Divide-And-Conquer'' type algorithms. Such algorithms are often capable of significantly reducing the order of complexity of an operation, by taking advantage of recursions, which occur when the original input is broken into halves, thirds, etc. Such repeated recursive breakdown often produces tree structures from an initially linear data input. And being able to visualize how the elements of these trees are recombined, when the operation is evaluated, can help us make smarter choices about how to apply a particular type of massively parallel computational resource to the computational problem. | This library can assist you in visualizing how computation is broken down, or decomposed, by certain ''Divide-And-Conquer'' type algorithms. Such algorithms are often capable of significantly reducing the order of complexity of an operation, by taking advantage of recursions, which occur when the original input is broken into halves, thirds, etc. Such repeated recursive breakdown often produces tree structures from an initially linear data input. And being able to visualize how the elements of these trees are recombined, when the operation is evaluated, can help us make smarter choices about how to apply a particular type of massively parallel computational resource to the computational problem. | ||

+ | |||

+ | One specific example is provided, a fast Fourier transform (FFT). Here is typical output from that example: | ||

+ | |||

+ | (If you compile and run ''Main.hs'', note that the two output files, ''tree.gv'' and ''legend.gv'' need to be post-processed, as follows, in order to generate the graphics shown, below.) | ||

+ | |||

+ | dot <filename_root>.gv -Tpng ><filename_root>.png | ||

+ | |||

+ | [[File:logtree.png]] | ||

+ | [[File:legend.png]] | ||

+ | |||

+ | == ToDo == | ||

+ | |||

+ | # Convert source to big boy Haskell, using Foldable, Traversable, etc. | ||

+ | # Add the ability to track and classify operations performed, including keeping track of "trivial" twiddles and phasors. | ||

+ | # Add more LogTree instances. | ||

+ | # Improve user documentation. ;-) | ||

[[Category:Applications]] | [[Category:Applications]] | ||

+ | [[Category:Libraries]] | ||

+ | [[Category:Packages]] |

## Latest revision as of 13:32, 28 April 2014

A set of types, classes, and functions for visualizing computation decomposition trees.

## [edit] 1 Introduction

This library can assist you in visualizing how computation is broken down, or decomposed, by certain *Divide-And-Conquer* type algorithms. Such algorithms are often capable of significantly reducing the order of complexity of an operation, by taking advantage of recursions, which occur when the original input is broken into halves, thirds, etc. Such repeated recursive breakdown often produces tree structures from an initially linear data input. And being able to visualize how the elements of these trees are recombined, when the operation is evaluated, can help us make smarter choices about how to apply a particular type of massively parallel computational resource to the computational problem.

One specific example is provided, a fast Fourier transform (FFT). Here is typical output from that example:

(If you compile and run *Main.hs*, note that the two output files, *tree.gv* and *legend.gv* need to be post-processed, as follows, in order to generate the graphics shown, below.)

dot <filename_root>.gv -Tpng ><filename_root>.png

## [edit] 2 ToDo

- Convert source to big boy Haskell, using Foldable, Traversable, etc.
- Add the ability to track and classify operations performed, including keeping track of "trivial" twiddles and phasors.
- Add more LogTree instances.
- Improve user documentation. ;-)