Output bugfix

This commit is contained in:
Florian Stecker
2016-11-07 17:22:16 +01:00
parent 8c21410dda
commit 03854910b9
2 changed files with 14 additions and 21 deletions

View File

@@ -365,19 +365,22 @@ static long enumerate_tree(const enumeration_info_t *info, signed char *level, i
level[head] = HEAD_MARKER;
int is_slim = transitive_closure(info, level, head, current_level);
int is_fat;
int is_balanced = 0;
int count = 0;
// we have a candidate, check if it is a balanced thickening; if so, write to stdout
if(is_slim) {
is_fat = 1;
is_balanced = 1;
for(int i = head - 1; i >= 0; i--)
if(level[i] == 0)
is_fat = 0;
is_balanced = 0;
}
output_thickening(info, level, current_level, is_slim, is_fat, count);
// comment this out (or just put it inside the if block) to save 1/3 of the runtime
output_thickening(info, level, current_level, is_slim, is_balanced, count);
if(is_fat) {
if(is_slim) {
if(is_balanced) {
count++;
fwrite(level, sizeof(signed char), info->size, info->outfile);
} else {