En fix and wordlength output

This commit is contained in:
Florian Stecker 2017-03-10 14:40:08 +01:00
parent 97100eef20
commit 7dff4f8365
2 changed files with 15 additions and 3 deletions

View File

@ -90,6 +90,18 @@ void balanced_thickening_callback(const bitvec_t *pos, int size, void *data)
bv_print(stdout, pos, size/2);
}
int max_length = 0;
for(int i = 0; i < size/2; i++) {
if(bv_get_bit(pos, i)) {
if(info->dq->cosets[i].max->wordlength > max_length)
max_length = info->dq->cosets[i].max->wordlength;
} else {
if(info->dq->cosets[size-i-1].max->wordlength > max_length)
max_length = info->dq->cosets[size-i-1].max->wordlength;
}
}
printf(" max length: %d", max_length);
/*
if(info->buffer) {
printf(" generators:");
@ -247,7 +259,7 @@ int main(int argc, const char *argv[])
printf("\n");
wl = dq->cosets[i].min->wordlength;
}
fprintf(stdout, "%s ", alphabetize(dq->cosets[i].min, stringbuffer));
fprintf(stdout, "%s(%d) ", alphabetize(dq->cosets[i].min, stringbuffer), dq->cosets[i].max->wordlength);
}
fprintf(stdout, "\n\n");
}

4
weyl.c
View File

@ -402,10 +402,10 @@ int weyl_opposition(semisimple_type_t type, int simple_root)
break;
case 'E':
if(type.factors[factor].rank == 6)
if(type.factors[factor].rank != 6)
iota_r = r;
else
iota_r = r == 3 || r == 4 ? r : 5 - r;
iota_r = r == 2 || r == 3 ? r : 5 - r;
break;
}