https://github.com/thekamik/searching-algorithms
Implementing Dijkstra, Bellman-Ford, and A* algorithms in C++
https://github.com/thekamik/searching-algorithms
a-star-algorithm bellman-ford-algorithm cpp dijkstra-algorithm graphs graphs-algorithms search-algorithm
Last synced: 3 days ago
JSON representation
Implementing Dijkstra, Bellman-Ford, and A* algorithms in C++
- Host: GitHub
- URL: https://github.com/thekamik/searching-algorithms
- Owner: thekamik
- License: mit
- Created: 2024-08-24T10:22:23.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2024-12-01T19:56:30.000Z (10 months ago)
- Last Synced: 2025-02-15T10:15:47.269Z (8 months ago)
- Topics: a-star-algorithm, bellman-ford-algorithm, cpp, dijkstra-algorithm, graphs, graphs-algorithms, search-algorithm
- Language: C++
- Homepage:
- Size: 75.2 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Search Algorithms Implementation
This project provides an implementation of several fundamental search algorithms in C++. The algorithms included are:
- **Dijkstra's Algorithm**: Finds the shortest paths from a single source vertex to all other vertices in a weighted graph with non-negative edge weights.
- **Bellman-Ford Algorithm**: Computes the shortest paths from a single source vertex to all other vertices in a graph that may contain negative edge weights.
- **A-star Algorithm**: Finds the shortest path between nodes using heuristics to improve efficiency in pathfinding.## Project Description
This repository contains code that is designed to be easily integrated into other projects. The primary component is the graph-related functionality, which can be seamlessly added to your own codebase.
## Project Structure
```
SEARCHING-ALGORITHMS/
├── example/
│ └── main.cpp # Example program demonstrating searching algorithms
├── include/
│ ├── graph.h # Header file for the graph implementation
│ └── node.h # Header file for the node implementation
├── src/
│ ├── graph.cpp # Implementation of the graph
│ └── node.cpp # Implementation of the node
├── CMakeLists.txt # CMake build configuration
└── run.ps1 # PowerShell script to automate the build and execution
```### Example
Refer to the `main.cpp` file in this repository for a practical example of how to use the code.
## Features
- **CMake Support**: The project uses CMake for build configuration and management.
- **Direct Compilation**: You can also compile the project directly using the provided `g++` command.
- **Designed as Library**: The project is structured to function as a reusable library.
## Usage
After compilation, you can run the main.exe to execute the search algorithms. Ensure that all necessary source files are in the appropriate directories.## Contributing
Feel free to contribute to this project by submitting issues or pull requests. Your contributions are welcome!