-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathvertex.h
More file actions
72 lines (62 loc) · 1.12 KB
/
Copy pathvertex.h
File metadata and controls
72 lines (62 loc) · 1.12 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
#ifndef VERTEX_H
#define VERTEX_H
#define DEFAULT 0
#define SERVER 1
#define MONITOR 2
#define CLIENT 3
/**
* @brief Um vértice do grafo, possui um id e um valor.
* Tipos possíveis: DEFAULT, SERVER, MONITOR, CLIENT
*
*/
typedef struct vertex Vertex;
/**
* @brief Inicia um vértice com id 'id'
*
* @param id
* @return Vertex*
*/
Vertex* initVertex (int id);
/**
* @brief Libera memória alocada para um vértice
*
* @param v
*/
void destroyVertex (Vertex* v);
/**
* @brief Retorna o valor de um vértice
*
* @param v
* @return long double
*/
long double getValue (Vertex* v);
/**
* @brief Seta o valor do vértice
*
* @param v
* @param value
*/
void setValue (Vertex* v, long double value);
/**
* @brief Retorna o id do vértice
*
* @param v
* @return int
*/
int getID (Vertex* v);
/**
* @brief Pré condição: 'tipo' é um tipo válido
* seta o tipo do vértice de acordo com as constantes pré definidas
*
* @param v
* @param tipo
*/
void setTipo (Vertex* v, int tipo);
/**
* @brief Retorna o tipo do objeto
*
* @param v
* @return int
*/
int getTipo (Vertex* v);
#endif