enumerate-balanced-ideals/thickenings.h

51 lines
1.7 KiB
C
Raw Normal View History

2016-07-26 08:09:34 +00:00
#ifndef THICKENINGS_H
#define THICKENINGS_H
2016-11-19 10:16:45 +00:00
#define BV_QWORD_RANK 10
#include "bitvec.h"
2016-11-20 22:19:08 +00:00
#include "weyl.h"
2016-07-26 08:09:34 +00:00
#define DEBUG(msg, ...) do{fprintf(stderr, msg, ##__VA_ARGS__); }while(0)
2016-10-14 16:49:20 +00:00
#define MAX_THICKENINGS 0 // 0 means infinite
#define HEAD_MARKER 127
2016-07-26 08:09:34 +00:00
typedef struct _edgelist {
int to;
struct _edgelist *next;
} edgelist_t;
2016-11-20 22:19:08 +00:00
// describes an element of the Weyl group; only "opposite" and "bruhat_lower" are being used for enumerating thickenings; everything else is just needed for initialization or output
2016-07-26 08:09:34 +00:00
typedef struct {
int *word;
int wordlength;
int *left;
int *right;
int opposite;
edgelist_t *bruhat_lower;
edgelist_t *bruhat_higher;
int is_hyperplane_reflection; // boolean value
2016-11-20 22:19:08 +00:00
weylid_t id;
2016-07-26 08:09:34 +00:00
} node_t;
2016-11-11 16:07:45 +00:00
// printing functions
2016-07-26 08:09:34 +00:00
char *alphabetize(int *word, int len, const char *alphabet, char *buffer);
2016-10-14 16:49:20 +00:00
void print_thickening(int rank, int order, const signed char *thickening, int level, const char *alphabet, FILE *f);
2016-11-11 16:07:45 +00:00
// generating the graph of the bruhat order
2016-11-19 10:16:45 +00:00
node_t *graph_alloc(semisimple_type_t type);
void graph_free(semisimple_type_t type, node_t *graph);
2016-11-11 16:07:45 +00:00
void prepare_graph(semisimple_type_t type, node_t *graph);
int prepare_simplified_graph(semisimple_type_t type, unsigned long left, unsigned long right, node_t *simplified_graph);
2016-11-19 10:16:45 +00:00
// enumerating balanced thickenings
long enumerate_balanced_thickenings(node_t *graph, int size, void (*callback) (const bitvec_t *, int, void*), void *callback_data);
2016-11-11 16:07:45 +00:00
// various helper functions
static int compare_wordlength(const void *a, const void *b, void *gr);
static int edgelist_contains(edgelist_t *list, int x);
static edgelist_t *edgelist_add(edgelist_t *list, int new, edgelist_t *storage, int *storage_index);
2016-07-26 08:09:34 +00:00
#endif