#ifndef GRAPHE_H
#define GRAPHE_H

#define MAXV 100
#include <stdio.h>
#include <stdlib.h>
#include <assert.h>
#include <stdbool.h>


struct sommetpond{int val; int poids;};
struct arete{int u; int v; int p;};

typedef struct arete arete;
typedef struct sommetpond sommetpond;


struct edgenode{
    sommetpond y;
    struct edgenode* next;
};

typedef struct edgenode edgenode;

struct graph {
    edgenode* edges[MAXV];
    int degree[MAXV];
    int nedges;
    int nbvertices;
    bool discovered[MAXV];
};

typedef struct graph graph;

void initialize_graph(graph * g);

void insert_edge(graph* g, int x ,int y, int p);

void read_graph(FILE* f, graph* g);

void free_edges(graph* g);

void initialize_search(graph* g);
#endif
