forked fromalgorithm-visualizer/tracers.cpp
- Notifications
You must be signed in to change notification settings - Fork0
📜Visualization Library for C++
NotificationsYou must be signed in to change notification settings
Affordan/tracers.cpp
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
This repository is part of the projectAlgorithm Visualizer.
tracers.cpp
is a visualization library for C++.You can use it onalgorithm-visualizer.org or locally on your machine.
Download and extract the source code in thelatest release.
Change directory to it and run:
mkdir buildcd buildcmake ..make install
// import visualization libraries {#include"algorithm-visualizer.h"// }#include<vector>#include<string>// define tracer variables {Array2DTracer array2dTracer = Array2DTracer("Grid");LogTracer logTracer = LogTracer("Console");// }// define input variablesstd::vector<std::string> messages{"Visualize","your","own","code","here!",};// highlight each line of messages recursivelyvoidhighlight(int line) {if (line >= messages.size())return; std::string message = messages[line];// visualize { logTracer.println(message); array2dTracer.selectRow(line,0, message.size() -1);Tracer::delay(); array2dTracer.deselectRow(line,0, message.size() -1);// }highlight(line +1);}intmain() {// visualize {Layout::setRoot(VerticalLayout({array2dTracer, logTracer})); array2dTracer.set(messages);Tracer::delay();// }highlight(0);return0;}
Check out theAPI reference for more information.
Check out thecontributing guidelines.
About
📜Visualization Library for C++
Resources
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Releases
No releases published
Packages0
No packages published
Languages
- C++93.0%
- CMake2.4%
- C2.4%
- Shell2.2%