When submitting a solution in C++, please select either C++14 (GCC 6-32) or C++17 (GCC 7-32) as your compiler. ×

shikhargupta's blog

By shikhargupta, history, 6 years ago, In English

Hello everyone! I have created a tool to create graphs and visualise graph algorithms — Graph Visualiser. It can be used to visualise graph algorithms in a step-by-step fashion. By adding just a few lines in your code of an algorithm, you can create a list of animation events which can then be viewed by the app.

pic Here I have used the app to demonstrate Tarjan's algorithm to find Strongly Connected Components.

pic Here I have used the app to demonstrate Kruskal's algorithm to find Minimum Spanning Tree. The animations are created using the GraphAnimator library (available for C++ and Java).

You can also create graphs in the app as shown below. pic

Download Graph Visualiser:- Windows Linux

EDIT: Note to Linux users: The setup requires you to copy some files into /usr/lib/x86_64-linux-gnu. Some files might be replaced. Please take a back up of these files or try using LD_LIBRARY_PATH for dynamic linking.

The zip file contains a pdf which has instructions on how to setup the app as well as information on all the features provided by the app. The zip file also contains sample codes.

Demos:- Demo 1 Demo 2 Demo 3

Happy Coding and Happy New Year in advance!

  • Vote: I like it
  • +38
  • Vote: I do not like it

| Write comment?
»
6 years ago, # |
Rev. 2   Vote: I like it 0 Vote: I do not like it

Nice work! Amazing :) Will you release one for Mac OS?

  • »
    »
    6 years ago, # ^ |
    Rev. 2   Vote: I like it +1 Vote: I do not like it

    Thank you :) Yes, if few more people require it. It is not a trivial task to make the Mac version :)

»
6 years ago, # |
  Vote: I like it 0 Vote: I do not like it

Hi Shikhar
I downloaded your graph visualiser tool and followed the steps for linux version. I copied all files from "extras" to "/usr/lib/x86_64-linux-gnu".Then I run the executable and got this error
./GraphAnimator: error while loading shared libraries: /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5: file too short .
When I was coping the files, some files were already present and their sizes were in MB but the copied files which were present in extras folder had only 19-20 bytes size. These are the files which were already present in folder.
libQt5Core.so.5
libQt5DBus.so.5
libQt5Gui.so.5
libQt5Widgets.so.5
I think libraries in extras are broken

  • »
    »
    6 years ago, # ^ |
    Rev. 2   Vote: I like it +1 Vote: I do not like it

    Hello limo. I have addressed this error in the pdf, but I will do so here again. The files without the extension .1 are links. Their actual size is 19-20 bytes, but as they link to the files with .1 extension they show those sizes. If you write the following commands, these files will now be linked:- (These commands will create new link files so you will need to delete the old ones — otherwise the command will say "file already exists")

    sudo ln -s libQt5Core.so.5.9.1 libQt5Core.so.5
    sudo ln -s libQt5DBus.so.5.9.1 libQt5DBus.so.5
    sudo ln -s libQt5Gui.so.5.9.1 libQt5Gui.so.5
    sudo ln -s libQt5Widgets.so.5.9.1 libQt5Widgets.so.5
    

    I assume the other 4 link files you copied will also be broken. You will have to use similar commands to make them work.

    sudo ln -s libQt5XcbQpa.so.5.9.1 libQt5XcbQpa.so.5
    sudo ln -s libicudata.so.56.1 libicudata.so.56
    sudo ln -s libicui18n.so.56.1 libicui18n.so.56
    sudo ln -s libicuuc.so.56.1 libicuuc.so.56
    

    I hope this fixes the issue. If not, please feel free to contact me again.

    If you want to revert the changes, again you will have to link the link files with your old files. So you will have to write commands such as sudo ln -s libQt5Core.so.5.4.2 libQt5Core.so.5