find fixpoints in simplified graph

This commit is contained in:
Florian Stecker 2016-11-14 11:54:52 +01:00
parent f9700589f8
commit 2a297a74ca
1 changed files with 22 additions and 8 deletions

View File

@ -10,6 +10,7 @@ int main(int argc, const char *argv[])
semisimple_type_t type;
unsigned long right_invariance, left_invariance;
int rank, order, hyperplanes, cosets;
int fixpoints;
node_t *graph;
@ -74,17 +75,30 @@ int main(int argc, const char *argv[])
}
fprintf(stderr, "\n\n");
// enumerate balanced thickenings
fixpoints = 0;
for(int i = 0; i < cosets; i++)
if(graph[i].opposite == i) {
if(fixpoints == 0)
fprintf(stderr, "No thickenings since the longest element fixes the following cosets: %s", alphabetize(graph[i].word, graph[i].wordlength, alphabet, string_buffer1));
else
fprintf(stderr, " %s", alphabetize(graph[i].word, graph[i].wordlength, alphabet, string_buffer1));
fixpoints++;
}
fwrite(&type.n, sizeof(int), 1, stdout);
fwrite(type.factors, sizeof(simple_type_t), type.n, stdout);
fwrite(&left_invariance, sizeof(unsigned long), type.n, stdout);
fwrite(&right_invariance, sizeof(unsigned long), type.n, stdout);
if(fixpoints > 0) {
fprintf(stderr, "\n\n");
} else {
long count = enumerate_balanced_thickenings(type, graph, cosets, alphabet, stdout);
// enumerate balanced thickenings
fwrite(&type.n, sizeof(int), 1, stdout);
fwrite(type.factors, sizeof(simple_type_t), type.n, stdout);
fwrite(&left_invariance, sizeof(unsigned long), type.n, stdout);
fwrite(&right_invariance, sizeof(unsigned long), type.n, stdout);
fprintf(stderr, "\n");
fprintf(stderr, "Found %ld balanced thickenings\n\n", count);
long count = enumerate_balanced_thickenings(type, graph, cosets, alphabet, stdout);
fprintf(stderr, "Found %ld balanced thickenings\n\n", count);
}
graph_free(type, graph);
free(type.factors);