Skip to content
This repository has been archived by the owner on Jan 17, 2022. It is now read-only.

Web app for visually representing algorithms on graphs.

Notifications You must be signed in to change notification settings

madalv/algorithms-on-graphs-web-app

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

algorithms-on-graphs-web-app

how to use?

Note: Even if initally your graph has capacity and is directed, once you click on an algorithm button for undirected graph, all edges will be considered as undirected and the result will be shown on an undirected graph. And vice-versa. The capacity switches to weight when needed and vice-versa.

How do I...

add edges? Go to the big white text box below the graph and type your edges, then click the Add Edges button next to it. Edges must be in the form: vertex1 vertex2 weight, with one space between them. The weight obviously a number (integer) and vertices a string or character. You can add more than one edge at once by writing each edge in a new line in the text box. Alternatively you can write all your edges in a .txt file and upload it using the Choose File button.

delete the current graph or add a new one? In either case, first click the Delete Graph button. Next, clear the text box and add the edges you wish to form the new graph.

add start and end nodes? Go the mini text boxes on the left of the big text box where you write edges. In the box marked Start Nodes write the name (or names, depending on the algorithm) of the vertices you wish to mark as start nodes. Same goes for end nodes.

see the result? First, on the graph. If you're not sure what exactly you're seeing, make sure you understand what the algorithm does properly. Second, in the dotted box on the left of the big text box.

set custom colors? Go to the navigation bar above and click Custom. Next, input a color such as red or a hex code such as #4287f5 to link or node color. Read the tooltips for more information (to see tooltips hover over Custom Link/Node Color). Important: You will only see your custom colors when the algorithm's result does not require special coloring of links or nodes. Also, you must re-render the graph for the colors to show (re-run the algorithm or press the Add Edges button).

• transpose graph? Go to Custom ! Transpose Graph.

• see bidirectional edges? If you have a graph with 2 edges between the same 2 nodes, you might want to check the Arc links? checkbox under Custom to see them clearly. If the graph is still moving, they will transform instantly. If not, click Add Edges or re-run the algorithm to see them.

Why can't I...

run the Max Flow algorithm! Probably forgot to add start and end nodes, as is written in the pop-up. Don't forget, you can add multiple start and end nodes for this algorithm! Make sure there is at least a path between your sources and targets, or your ow will be non-existent (0).

run the Shortest Path algorithm! Probably forgot to add start and end nodes. Only one of each though! Also, to second the shortest path in a directed graph, make sure there is an actual path between the source and target, otherwise your shortest path will be non-existent.

see my custom colors! In case of the Strongly Connected Components, Max Flow, or Graph Coloring, the results must be shown by coloring nodes and links certain colors and conflict with your custom set colors. For the other algorithms (and simple graphs) they should be there! Also, see How do I set custom colors?

add edges Most probably you're not using the necessary syntax. See How do I add edges?

About

Web app for visually representing algorithms on graphs.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published