#ifndef WAKIM_ODIER_TP2_H_INCLUDED
#define WAKIM_ODIER_TP2_H_INCLUDED

#include <stdlib.h>
#include <iostream>
#include <fstream>
#include <string>

using namespace std;

typedef struct list_Node
{
    int value;
    list_Node *next;
    list_Node *arc;
}list_Node;



list_Node* new_Node(int i, list_Node* l);
void free_list(list_Node *l);
list_Node* cree_list(int nbS);
list_Node* recherche(list_Node* G, int ext);
bool add_arc(list_Node* l, int ext, int val);
list_Node* lecture_graphe_prev (string nom);
list_Node* lecture_graphe_succ (string nom);
void aff_graphe(list_Node* G);

list_Node* lbell_equal(list_Node* lhead, list_Node* Ghead);
list_Node* bellman(list_Node* G, int source, string name);
void aff_bellman(list_Node* G, int step, int somme, string name);

/**Fonctions TP2 */
list_Node* lecture_graphe (string nom);
bool if_connexe (list_Node *G);
list_Node* copie_liste (list_Node* G);
list_Node* supp_sommet (list_Node *G, list_Node *S);
bool circuit_graphe (list_Node *G);
void resultat_tp2(list_Node* G, string name, bool type);


/**Fonctions TP3*/
list_Node* kruskal_destructif(list_Node *G, string name);
void supp_arete(list_Node* G, int sommet1, int sommet2);
void add_arete(list_Node* G, int sommet1, int sommet2, int val);
void recherche_max(list_Node* G, int* tab);
int recherche_min(list_Node* G);
int calcul_poids (list_Node* G);
void save_graph(list_Node *G, string name);

#endif // WAKIM_ODIER_TP2_H_INCLUDED
