bugs in transitive reduction?
This commit is contained in:
parent
241065565d
commit
68bc766f92
33
coxeter.c
33
coxeter.c
@ -144,6 +144,38 @@ int coxeter_order(semisimple_type_t type)
|
||||
return order;
|
||||
}
|
||||
|
||||
int coxeter_hyperplanes(semisimple_type_t type)
|
||||
{
|
||||
int hyperplanes = 0;
|
||||
for(int i = 0; i < type.n; i++) {
|
||||
if(type.factors[i].series == 'A') // rank*(rank+1)/2
|
||||
hyperplanes += (type.factors[i].rank * (type.factors[i].rank + 1)) / 2;
|
||||
else if(type.factors[i].series == 'B' || type.factors[i].series == 'C') // rank * rank
|
||||
hyperplanes += type.factors[i].rank * type.factors[i].rank;
|
||||
else if(type.factors[i].series == 'D') // rank * (rank - 1)
|
||||
hyperplanes += type.factors[i].rank * (type.factors[i].rank - 1);
|
||||
else if(type.factors[i].series == 'E') {
|
||||
if(type.factors[i].rank == 6)
|
||||
hyperplanes += 36;
|
||||
else if(type.factors[i].rank == 7)
|
||||
hyperplanes += 63;
|
||||
else if(type.factors[i].rank == 8)
|
||||
hyperplanes += 120;
|
||||
else
|
||||
ERROR(1, "A Coxeter group of type %c%d does not exist or is not implemented!\n", type.factors[i].series, type.factors[i].rank);
|
||||
} else if(type.factors[i].series == 'F') {
|
||||
ERROR(type.factors[i].rank != 4, "A Coxeter group of type %c%d does not exist or is not implemented!\n", type.factors[i].series, type.factors[i].rank);
|
||||
hyperplanes += 24;
|
||||
} else if(type.factors[i].series == 'G') {
|
||||
ERROR(type.factors[i].rank != 2, "A Coxeter group of type %c%d does not exist or is not implemented!\n", type.factors[i].series, type.factors[i].rank);
|
||||
hyperplanes += 6;
|
||||
} else {
|
||||
ERROR(1, "A Coxeter group of type %c%d does not exist or is not implemented!\n", type.factors[i].series, type.factors[i].rank);
|
||||
}
|
||||
}
|
||||
return hyperplanes;
|
||||
}
|
||||
|
||||
static void generate_starting_vector(int rank, gsl_matrix *schlaefli, gsl_vector *result)
|
||||
{
|
||||
gsl_matrix *schlaefliLU = gsl_matrix_alloc(rank, rank);
|
||||
@ -179,7 +211,6 @@ void generate_coxeter_graph(semisimple_type_t type, int *result)
|
||||
queue_t queue;
|
||||
int current;
|
||||
|
||||
|
||||
for(int i = 0; i < rank; i++)
|
||||
generators[i] = gsl_matrix_view_array(generators_data + i*rank*rank, rank, rank).matrix;
|
||||
for(int i = 0; i < order; i++)
|
||||
|
@ -13,6 +13,7 @@ typedef struct {
|
||||
|
||||
void generate_coxeter_graph(semisimple_type_t type, int *result);
|
||||
int coxeter_order(semisimple_type_t type);
|
||||
int coxeter_hyperplanes(semisimple_type_t type);
|
||||
int coxeter_rank(semisimple_type_t type);
|
||||
|
||||
#endif
|
||||
|
@ -52,10 +52,7 @@ int main(int argc, const char *argv[])
|
||||
|
||||
// print stuff
|
||||
|
||||
int hyperplane_count = 0;
|
||||
for(int i = 0; i < order; i++)
|
||||
if(graph[i].is_hyperplane_reflection)
|
||||
hyperplane_count++;
|
||||
int hyperplane_count = coxeter_hyperplanes(type);
|
||||
|
||||
fprintf(stderr, "Rank: %d\t\tOrder: %d\t\tHyperplanes: %d\n", rank, order, hyperplane_count);
|
||||
fprintf(stderr, "\n");
|
||||
|
@ -12,6 +12,12 @@
|
||||
|
||||
char *alphabetize(int *word, int len, const char *alphabet, char *buffer)
|
||||
{
|
||||
if(len == 0) {
|
||||
buffer[0] = '1';
|
||||
buffer[1] = 0;
|
||||
return buffer;
|
||||
}
|
||||
|
||||
int i = 0;
|
||||
for(i = 0; i < len; i++)
|
||||
buffer[i] = alphabet[word[i]];
|
||||
|
Loading…
Reference in New Issue
Block a user