Skip to content

Latest commit

 

History

History
27 lines (23 loc) · 1.5 KB

README.md

File metadata and controls

27 lines (23 loc) · 1.5 KB

Pathfinder - finding the shortest path between given cities.

This is implementation of the Floyd-Warshall algorithm.

In computer science, the Floyd–Warshall algorithm (also known as Floyd's algorithm, the Roy–Warshall algorithm, the Roy–Floyd algorithm, or the WFI algorithm) is an algorithm for finding shortest paths in a weighted graph with positive or negative edge weights (but with no negative cycles).

For more details Wiki.

Compilation

  • To compile write `make` in root directory.
  • Compilation was done on MacOS. Other OS were not tested.

Quickstart

  • First you need to compile the project. Just write make in root directory. After compilation pathfinder file appears in root directory.
  • To test program you can use my default example(contained in root directory). Write ./pathfinder example
  • If you want to use your own data, you should create file with the same syntax as in example file.

File syntax:

[int - number of unique cities]\n
City1-City2,[int - distance between this cities]\n
CityX-CityY,[int - distance between this cities]\n

Overview

ezgif com-video-to-gif