-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
049ea3c
commit d3cbd89
Showing
16 changed files
with
147 additions
and
102 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
Aresta;Origem;Destino;Peso | ||
1;1;2;126 | ||
2;1;3;99 | ||
3;1;4;189 | ||
4;2;3;99 | ||
5;3;5;81 | ||
6;4;5;76 | ||
7;2;6;80 | ||
8;2;7;85 | ||
9;3;8;85 | ||
10;5;8;85 | ||
11;6;7;81 | ||
12;7;8;117 | ||
13;7;9;135 | ||
14;7;10;120 | ||
15;8;9;49 | ||
16;8;11;180 | ||
17;9;10;54 | ||
18;9;12;99 | ||
19;9;13;162 | ||
20;10;13;171 | ||
21;11;14;117 | ||
22;12;14;153 | ||
23;12;13;108 | ||
24;13;17;414 | ||
25;13;15;162 | ||
26;14;15;180 | ||
27;14;16;243 | ||
28;15;16;189 | ||
29;15;18;81 | ||
30;15;20;279 | ||
31;15;21;315 | ||
32;16;18;90 | ||
33;17;20;378 | ||
34;18;19;180 | ||
35;19;21;189 | ||
36;20;21;135 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
/** | ||
* @file insertion_sort.c | ||
* | ||
* @author Guilherme Camargo Valese | ||
*/ | ||
#include "insertion_sort.h" | ||
|
||
/** | ||
* @brief Ordenação por inserção | ||
* @param **dados: vetor de ponteiros | ||
* @param *n: ponteiro para a quantidade total de dados | ||
*/ | ||
void insertion_sort(dado_t **dados, int n) | ||
{ | ||
int i, j; | ||
|
||
for(i = 1; i < n; i++) | ||
{ | ||
for(j = i; j > 0 && dados[j-1]->peso > dados[j]->peso; j--) | ||
{ | ||
swap(&dados[j], &dados[j-1]); | ||
} | ||
} | ||
} | ||
|
||
/** | ||
* @brief Faz a troca de dois elementos de um vetor | ||
* @param a: ponteiro para o primeiro elemento | ||
* @param b: ponteiro para o segundo elemento | ||
*/ | ||
void swap(dado_t **a , dado_t **b) | ||
{ | ||
dado_t *temp; | ||
temp = *a; | ||
*a = *b; | ||
*b = temp; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
#ifndef INSERTION_SORT_H | ||
#define INSERTION_SORT_H | ||
|
||
#include "dados.h" | ||
|
||
void insertion_sort(dado_t **dados, int n); | ||
void swap(dado_t **a , dado_t **b); | ||
|
||
#endif /* INSERTION_SORT_H */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
/** | ||
* @file kruskal.c | ||
* | ||
* @author Guilherme Camargo Valese | ||
*/ | ||
#include "kruskal.h" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
#ifndef KRUSKAL_H | ||
#define KRUSKAL_H | ||
|
||
#include "grafo.h" | ||
|
||
|
||
#endif /* KRUSKAL_H */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Binary file not shown.