Annotation of OpenXM_contrib2/asir2000/lib/katsura, Revision 1.1
1.1 ! noro 1: /* $OpenXM: OpenXM/src/asir99/lib/katsura,v 1.1.1.1 1999/11/10 08:12:30 noro Exp $ */
! 2: def mku(L,N)
! 3: {
! 4: if (L < 0)
! 5: L = -L;
! 6: if (L <= N)
! 7: return strtov("u"+rtostr(L));
! 8: return 0;
! 9: }
! 10:
! 11: /* generate katsura systems */
! 12:
! 13: def katsura(N)
! 14: {
! 15: R = [];
! 16: for(L = 0; L < N; L++) {
! 17: for(A = -mku(L,N),I = -N; I <= N; I++)
! 18: A += mku(L-I,N)*mku(I,N);
! 19: R = cons(A,R);
! 20: }
! 21: for(A = 0, L = -N; L <= N; L++)
! 22: A += mku(L,N);
! 23: R = cons(A-1,R);
! 24: return R;
! 25: }
! 26:
! 27: /* generate homogenized katsura systems */
! 28:
! 29: def hkatsura(N)
! 30: {
! 31: R = [];
! 32: for(L = 0; L < N; L++) {
! 33: for(A = -mku(L,N)*t,I = -N; I <= N; I++)
! 34: A += mku(L-I,N)*mku(I,N);
! 35: R = cons(A,R);
! 36: }
! 37: for(A = 0, L = -N; L <= N; L++)
! 38: A += mku(L,N);
! 39: R = cons(A-t,R);
! 40: return R;
! 41: }
! 42: end$
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>