- Notifications
You must be signed in to change notification settings - Fork14
📜Visualization Library for C++
NotificationsYou must be signed in to change notification settings
algorithm-visualizer/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++
Topics
Resources
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Packages0
No packages published
Uh oh!
There was an error while loading.Please reload this page.
Contributors2
Uh oh!
There was an error while loading.Please reload this page.