This repository contains a React application for editing and analyzing graphs. The application offers various features, including node and edge editing, graph algorithm execution, and graph export/import. You can try it out here.
The application is divided into different components, each responsible for a specific part of the graph editor. Here are the main components:
This component is responsible for editing nodes in the graph. It offers the following functionalities:
- Add nodes
- Edit existing nodes
- Delete nodes
- Clear all nodes
Provides additional information about the graph, including:
- Graph order and size
- Adjacency check between two nodes
- Getting the degree of a node
- Getting adjacent nodes to a node
Responsible for editing edges in the graph. It offers similar functionalities to NodeEditor, including:
- Add edges
- Edit existing edges
- Delete edges
- Clear all edges
This component allows for the execution of algorithms on the graph, currently including:
- Dijkstra's algorithm
- Graph diameter calculation
The application footer contains useful links, export/import icons, and an option to select the graph's direction.
To run the application, follow these steps:
-
Make sure you have Node.js installed on your system.
-
Clone this repository using the command:
git clone [https://github.com/YOUR_USERNAME/repository-name.git](https://github.com/YOUR_USERNAME/repository-name.git)
-
Navigate to the project directory:
cd repository-name -
Install the dependencies using the command:
npm install
-
Start the application with:
npm run dev
The application will be available locally.
The application uses the Cytoscape library for graph visualization and manipulation. Be sure to check the Cytoscape documentation for more information on its functionalities.
