find fixpoints in simplified graph

This commit is contained in:
Florian Stecker 2016-11-14 11:54:52 +01:00
parent f9700589f8
commit 2a297a74ca

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,8 +75,21 @@ 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++;
}
if(fixpoints > 0) {
fprintf(stderr, "\n\n");
} else {
// 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);
@ -83,8 +97,8 @@ int main(int argc, const char *argv[])
long count = enumerate_balanced_thickenings(type, graph, cosets, alphabet, stdout);
fprintf(stderr, "\n");
fprintf(stderr, "Found %ld balanced thickenings\n\n", count);
}
graph_free(type, graph);
free(type.factors);