Skip to content

Java implementation of graphs using adjacency matrices. It includes various algorithms for finding shortest paths, detecting cycles, performing pre-order traversals, and calculating the graph's height.

License

Notifications You must be signed in to change notification settings

MatiasCarabella/graph-matrix-pathfinder

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 

Repository files navigation

Graph Matrix Implementation

This project is an implementation of graphs using adjacency matrices in Java. It includes algorithms to find shortest paths and detect cycles.

Features

  • Create a graph with a specified number of vertices.
  • Add weighted edges.
  • Print the adjacency matrix.
  • Find the shortest path using the Bellman-Ford algorithm.
  • Detect cycles in the graph.
  • Perform a pre-order traversal.
  • Calculate the height of the "tree" from a given node.
  • Find the shortest path between two vertices using Dijkstra's algorithm.

Usage

Compile and run the Main class to see an example usage

License

This project is licensed under the MIT License - see the LICENSE file for details.

About

Java implementation of graphs using adjacency matrices. It includes various algorithms for finding shortest paths, detecting cycles, performing pre-order traversals, and calculating the graph's height.

Topics

Resources

License

Stars

Watchers

Forks

Languages