Giter VIP home page Giter VIP logo

visual-graph-isomorphism's Introduction

Visual Graph Isomorphism

visual-graph-isomorphism

A program that shows graph isomorphism visually by adjusting the position of nodes according to the mapping obtained through NetworkX library. In order to display the graphs and adjusting their nodes, D3.js library is used.

Downloading & Running

Download Repository

git clone https://github.com/selcukguvel/visual-graph-isomorphism

Create a virtual environment and activate it

https://packaging.python.org/guides/installing-using-pip-and-virtual-environments/

Install dependencies

pip3 install -r requirements.txt

Run Program

python3 service/graph_matcher.py
Open index.html

Graph File Format

In an undirected graph file, each line contains space separated ids of two nodes:

node_1   node_2
node_1   node_4
node_2   node_3
node_3   node_4
...

where node_i is the id of the node as a number. The order of vertices in the file is trivial.

Steps & Approach

  • Run program.
  • Upload two graphs to display them in the left and the right of the page.
  • Click Check Isomorphism button.
    • Left graph will be adjusted according to the mapping (although there may be multiple mappings between the graphs, the one that NetworkX library returns is considered).
    • The positions of the nodes are adjusted with respect to distances between their initial positions and the mapped nodes' positions, using the Euclidean distance, in increasing order.
  • Click to one of the nodes in left or right graph to highlight the id mapping row between these nodes in the table.
  • Click Save button in order to save the mapping between two graphs as a file to the mapping directory.
  • Adjust the right graph as you want and click again Check Isomorphism button to adjust the left graph to final node positions displayed in the right graph.
  • Upload new graphs and check isomorphism as many as you want.

visual-graph-isomorphism's People

Contributors

dependabot[bot] avatar selcukguvel avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.