improved idealbounds a bit, but thrown it out of Makefile
This commit is contained in:
parent
16125bd8a8
commit
0c3341d8c2
17
Makefile
17
Makefile
@ -5,15 +5,19 @@ HEADERS=weyl.h thickenings.h queue.h bitvec.h
|
|||||||
SPECIAL_OPTIONS=-O3 -flto -funroll-loops -Winline
|
SPECIAL_OPTIONS=-O3 -flto -funroll-loops -Winline
|
||||||
|
|
||||||
OPTIONS=-m64 -march=native -mtune=native -std=gnu99 -D_GNU_SOURCE $(SPECIAL_OPTIONS)
|
OPTIONS=-m64 -march=native -mtune=native -std=gnu99 -D_GNU_SOURCE $(SPECIAL_OPTIONS)
|
||||||
|
NAME=enumerate-balanced-ideals
|
||||||
|
|
||||||
all: enumerate idealbounds graph
|
all: enumerate graph
|
||||||
|
|
||||||
|
$(NAME).tar.bz2: $(NAME) $(HEADERS) enumerate.c weyl.c thickenings.c
|
||||||
|
tar cjhf $(NAME).tar.bz2 $(NAME)/enumerate.c $(NAME)/weyl.c $(NAME)/thickenings.c $(NAME)/weyl.h $(NAME)/thickenings.h $(NAME)/queue.h $(NAME)/bitvec.h $(NAME)/Makefile $(NAME)/graph.c
|
||||||
|
|
||||||
|
$(NAME):
|
||||||
|
ln -s . $(NAME)
|
||||||
|
|
||||||
enumerate: enumerate.o weyl.o thickenings.o
|
enumerate: enumerate.o weyl.o thickenings.o
|
||||||
gcc $(OPTIONS) -o enumerate enumerate.o thickenings.o weyl.o
|
gcc $(OPTIONS) -o enumerate enumerate.o thickenings.o weyl.o
|
||||||
|
|
||||||
idealbounds: idealbounds.o weyl.o
|
|
||||||
gcc $(OPTIONS) -o idealbounds idealbounds.o weyl.o
|
|
||||||
|
|
||||||
graph: graph.o weyl.o
|
graph: graph.o weyl.o
|
||||||
gcc $(OPTIONS) -o graph graph.o weyl.o
|
gcc $(OPTIONS) -o graph graph.o weyl.o
|
||||||
|
|
||||||
@ -26,11 +30,8 @@ thickenings.o: thickenings.c $(HEADERS)
|
|||||||
weyl.o: weyl.c $(HEADERS)
|
weyl.o: weyl.c $(HEADERS)
|
||||||
gcc $(OPTIONS) -c weyl.c
|
gcc $(OPTIONS) -c weyl.c
|
||||||
|
|
||||||
idealbounds.o: idealbounds.c $(HEADERS)
|
|
||||||
gcc $(OPTIONS) -c idealbounds.c
|
|
||||||
|
|
||||||
graph.o: graph.c $(HEADERS)
|
graph.o: graph.c $(HEADERS)
|
||||||
gcc $(OPTIONS) -c graph.c
|
gcc $(OPTIONS) -c graph.c
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
rm -f enumerate idealbounds graph thickenings.o weyl.o enumerate.o idealbounds.o graph.o
|
rm -f enumerate graph thickenings.o weyl.o enumerate.o graph.o $(NAME) $(NAME).tar.bz2
|
||||||
|
@ -5,10 +5,24 @@
|
|||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
|
||||||
|
static char* alphabetize(weylgroup_element_t *e, char *str)
|
||||||
|
{
|
||||||
|
if(e->wordlength == 0)
|
||||||
|
sprintf(str, "1");
|
||||||
|
else {
|
||||||
|
for(int j = 0; j < e->wordlength; j++)
|
||||||
|
str[j] = e->word[j] + 'a';
|
||||||
|
str[e->wordlength] = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
return str;
|
||||||
|
}
|
||||||
|
|
||||||
int main(int argc, char *argv[])
|
int main(int argc, char *argv[])
|
||||||
{
|
{
|
||||||
semisimple_type_t type;
|
semisimple_type_t type;
|
||||||
simple_type_t simple;
|
simple_type_t simple;
|
||||||
|
char buf[100];
|
||||||
|
|
||||||
simple.series = 'A';
|
simple.series = 'A';
|
||||||
simple.rank = atoi(argv[1]);
|
simple.rank = atoi(argv[1]);
|
||||||
@ -43,12 +57,12 @@ int main(int argc, char *argv[])
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if(!found) {
|
if(!found) {
|
||||||
printf("%d %d not found\n", i, dq->cosets[i].min->wordlength);
|
printf("%s %d not found\n", alphabetize(dq->cosets[i].min, buf), dq->cosets[i].min->wordlength);
|
||||||
if(dq->cosets[i].min->wordlength < minimum)
|
if(dq->cosets[i].min->wordlength < minimum)
|
||||||
minimum = dq->cosets[i].min->wordlength;
|
minimum = dq->cosets[i].min->wordlength;
|
||||||
break;
|
// break;
|
||||||
} else {
|
} else {
|
||||||
printf("%d %d found\n", i, dq->cosets[i].min->wordlength);
|
printf("%s %d found\n", alphabetize(dq->cosets[i].min, buf), dq->cosets[i].min->wordlength);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user