Skip to content
Snippets Groups Projects
Commit 9b0b20f7 authored by Manuel Bucher's avatar Manuel Bucher
Browse files

Removed debug prints

parent f764b3fb
No related merge requests found
......@@ -209,22 +209,6 @@ int field_neighbours(Field *this) {
return 0;
}
void field_print(Field *this) {
printf("[\n");
Tile *t = this->tiles;
for (uint32_t i = 1; i < this->num_tiles; i++){
printf("\t(%u %u): {", t[i].x, this->tiles[i].y);
for (int j = 0; j < 4; j++) {
if(t[i].neigh[j] != 0) {
Tile *neigh = &t[t[i].neigh[j]];
printf(" (%u %u)", neigh->x, neigh->y);
}
}
printf(" }\n");
}
printf("]\n");
}
/********** Schlange von Tiles **********/
typedef struct Queue {
Tile *p_first;
......@@ -318,14 +302,13 @@ bool hk_dfs(Field *this, uint32_t e) {
void hk_print(Field *this) {
Tile *t = this->tiles;
/*for (uint32_t i = 1; i < this->num_tiles; i++) {
for (uint32_t i = 1; i < this->num_tiles; i++) {
uint32_t p = t[i].pair;
printf("%u: %u %u;%u %u\n", i, t[i].x, t[i].y, t[p].x, t[p].y);
if (this->tiles[i].pair == 0) {
printf("None\n");
return;
}
}*/
}
for (uint32_t i = 1; i < this->num_tiles; i++) {
if (!tile_odd(&t[i]))
continue;
......@@ -361,17 +344,16 @@ int main() {
fprintf(stderr, "Error: Duplicated entry\n"); // Duplikat exisitert
break;
}
//field_print(&f);
if (f.num_tiles - f.num_odd == f.num_odd) {
printf("None\n");
fprintf(stderr, "Ungleiche Knotenbelegung");
break;
}
hk(&f); // Algorithmus von Hopcroft und Karp
result = EXIT_SUCCESS;
break;
case ReadEof: result = EXIT_SUCCESS; break;
// Fehlerausgabe
case ReadErrOverflow: fprintf(stderr, "%u: too big integer\n", f.num_tiles); break;
case ReadErrInvalidChar: fprintf(stderr, "%u: invalid character\n", f.num_tiles); break;
case ReadErrTooFewNumbers: fprintf(stderr, "%u: too few numbers\n", f.num_tiles); break;
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment