33 lines
751 B
C
33 lines
751 B
C
#ifndef COXETER_H
|
|
#define COXETER_H
|
|
|
|
#include <inttypes.h>
|
|
|
|
typedef struct _groupelement {
|
|
int id;
|
|
int letter;
|
|
struct _groupelement *parent;
|
|
int need_to_compute; // optimization flag; if 0, will skip matrix computation
|
|
|
|
int length;
|
|
struct _groupelement *inverse;
|
|
struct _groupelement **left;
|
|
struct _groupelement **right;
|
|
struct _groupelement *conjugacy_class;
|
|
} groupelement_t;
|
|
|
|
typedef struct _group {
|
|
int rank;
|
|
int *coxeter_matrix;
|
|
int size;
|
|
groupelement_t *elements;
|
|
groupelement_t **lists;
|
|
} group_t;
|
|
|
|
group_t *coxeter_init(int rank, int *coxeter_matrix, int nmax);
|
|
group_t *coxeter_init_triangle(int p, int q, int r, int nmax);
|
|
void coxeter_clear(group_t *g);
|
|
int coxeter_snprint(char *str, int buflen, groupelement_t *g);
|
|
|
|
#endif
|