-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathaffect.h
More file actions
85 lines (72 loc) · 3.07 KB
/
affect.h
File metadata and controls
85 lines (72 loc) · 3.07 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
/******************************************************************/
/** **/
/** GRAPH.H **/
/** **/
/******************************************************************/
#include <stdio.h>
#include <string.h>
#include <stdio.h>
#include <unistd.h>
#include <stdlib.h>
#include <getopt.h>
#include <ctype.h>
#include "couleurs.h"
#ifndef PROF
#define ROW 0
#define COL 1
#define RIEN 256 // Matrice : avec autre chose que zero
#define ZERO 2 // Zero ni marke, ni barre
#define BARRE 4 // Zero BArré
#define MARKE 8 // zero Marqué
#define L_RIEN 16 // Matrices ligne : Pas marquée
#define L_MARKE 32 // ligne marqué
#define C_RIEN 32 // Matrices colone : Pas marquée
#define C_MARKE 16 // colonne marquée
#define FICH 4 // Flag pour fichier
#define VERB 8 // Flag pour verbose
#define PAS_NOM 16 // Flag pour ne pas lire les noms des lignes et colonnes
#define INVERT 32 // Invert the matrix : we don't Minimize cost BUT maximize gain
int OPTIONS ; // Flag pour les options
int NBR_SOMMET ; // Nombre de sommet dans le Graph
float ** Matrice ; // Matrice representant le Graph avec conso max
float ** Matrice_svg ; // Matrice representant le Graph avec conso max
int ** Matrice_zero ; // Matrice des consomations en cour
int * Matrice_ligne ; // Matrice des consomations en cour
int * Matrice_colonne; // Matrice des consomations en cour
char ** Nom_ligne ; // Matrice avec les noms de chaques Sommets
char ** Nom_colonne ; // Matrice avec les noms de chaques Sommets
#else
extern int OPTIONS ; // Flag pour les options
extern int NBR_SOMMET ; // Nombre de sommet dans le Graph
extern float ** Matrice ; // Matrice representant le Graph avec conso max
extern float ** Matrice_svg ; // Matrice representant le Graph avec conso max
extern float ** Matrice_zero ; // Matrice des consomations en cour
extern char ** Nom_ligne ; // Matrice avec les noms de chaques Sommets
extern char ** Nom_colonne ; // Matrice avec les noms de chaques Sommets
#endif
// ---------------------------------------------
int ChargeFichier ( char * fichier );
// Fonctions d'affichage -----------------------
void ExitError ( char * Mess );
void ShowHelp( char *Name );
void ShowExample(char * Name );
void AfficheTotal( void ) ;
void AfficheConso( void ) ;
void AfficheParcour( void );
void AfficheMatrice( void );
void AfficheZero( void );
float AfficheRelations(void );
// ----------------------------------------------
void LitOptions ( int argc, char ** argv ) ;
// fonction.c -----------------------------------------------
int VerifyNbr ( char * Nbr );
void Init_Matrice_colonne ( void ) ;
void Init_Matrice_ligne ( int Marquage ) ;
void Copie_zero ( void );
void Bare_colonne( int colonne );
void Bare_ligne( int ligne );
void Invert ( void );
void Decharge ( void );
//void Marque_Ligne( int l );
//void Marque_Colonne( int c );
void Marque_Matrice( void );