Skip to content

Divy2000/Graph-Operations-and-Search

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

64 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Graph Operations Java Application

This Java application performs various operations on graph structures, including parsing DOT files, managing nodes and edges, and visualizing graphs. It also supports search algorithms like Breadth-First Search (BFS) and Depth-First Search (DFS).

Features

  • Graph Parsing: Parse .dot files to create and manipulate graph structures.
  • Node and Edge Management: Add and remove nodes and edges from the graph.
  • Visualization: Export the graph to .dot files and images.
  • Search Algorithms: Implement BFS and DFS for graph traversal.
  • Command-Line Interface: Interact with the graph and perform operations via a command-line interface.

How to Run

  1. Run the Application:

    • Execute src/main/application/Main.java to access the command-line interface.
  2. Run Test Cases:

    • Execute test/myGraphClass.java to run the test cases.

Command-Line Interface

Use the following commands to interact with the application:

  • Parse .dot file: src/main/java/testGraph.dot
  • Print graph details: 0
  • Output graph details to file: 1 followed by src/main/java/testGraph.txt
  • Add a node: 2 followed by node0
  • Add multiple nodes: 3 followed by node1,node2,node3
  • Add an edge: 4 followed by white and node3
  • Remove a node: 5 followed by yellow
  • Remove multiple nodes: 6 followed by node1,black
  • Remove an edge: 7 followed by blue and cyan
  • Output graph to .dot file: 8 followed by src/main/java/testGraph_o.dot
  • Output graph to image: 9 followed by src/main/java/testGraph.png
  • Exit: Q
  • Perform BFS/DFS search: 10 followed by bfs or dfs

Features and Commits

Pull Requests

Merge Commit

About

CSE 464 class project repo

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages