Giter VIP home page Giter VIP logo

dijkstra-voronoi's Introduction

Projet LIFAPC

Graphe d’un terrain et diagramme de Voronoï

🧐 A propos

Programme en C++ permettant de générer un graphe d’un terrain et un diagramme de Voronoï correspondant au résultat de l'algorithme de Dijkstra (avec et sans coût).

Sujet de TP

Disponible ici

NOTE FINALE : 19,5/20 (meilleure note/92 étudiants)

🏁 Prérequis

g++

📁 Structure des dossiers

├── bin
│
├── data
│
├── obj
│
├── src
│   ├── Graphe.h/cpp
│   ├── graphe_main.h/cpp
│   ├── graphe_tests.h/cpp
│   └── MReadWrite.h/cpp
│
├── Makefile
│
└── README.md

👨🏻‍💻 Compilation

  • Ouvrir un terminal dans le dossier du projet

  • Compiler avec

make
  • Nettoyer les fichiers objets et exécutables avec
make clean

🚀 Lancement

  • Lancer le programme avec
./bin/graphe_main
  • Lancer les tests avec
./bin/graphe_tests

📝 Utilisation et modification des graphes

Un graphe est de la forme suivante, sous la forme d'un fichier .txt:

nombre_lignes nombre_colonnes
valeur valeur ... valeur
...
valeur valeur ... valeur

exemple : 
2 4
1 2 3 4
5 6 7 8
  • Les valeurs sont composées avec la forme suivante :

Si le noeud possède une librairie :

L(Coût)Altitude
exemple :
L(2)4

Si le noeud ne possède pas de librairie :

Altitude
exemple : 4
  • Charger un graphe

Appeler le constructeur prenant un fichier en paramètre

exemple
Graphe g("./data/exempleGraphe.txt");
  • Afficher un graphe
g.afficher();
  • Afficher les diagrammes de Voronoï
Diagramme de Voronoï avec Dijkstra sans coût :
g.applyDijsktra(); 

Diagramme de Voronoï avec Dijkstra avec coût :
g.VoronoiLivraison();

✍️ Auteurs

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.