📄 m_groebner_mip.s
字号:
/*M Groebner basis algorithm over Z/pZ (where p is an arbitrary prime) (If p is < BASIS (BASIS = 2^30 = 1073741824), you should use the msp-program.) input: a list of polynomials over Z/pZM*/#include <_pol1.h>main(){ single anz,met,r; int p; pol P; list VL,PL,PL1; init(p,P,VL,PL,PL1); PL = _0; GBRHO = 0;/* arbitrary prime p */ printf("\n Enter a prime p : "); p = geti();/* list of variables occuring in the polynomials */ printf("\n Enter the variable list for the polynomials\n"); printf(" (e.g. in the form \"x y z #\") : "); VL = getvl(); r = llength(VL);/* term order */ printf("\n The following term orders are possible:\n"); printf(" - lexicographical ( EVORD = 1 ),\n"); printf(" - graduated lexicographical ( EVORD = 2 ),\n"); printf(" - total degree ordering\n"); printf(" (Buchberger's total degree ordering) ( EVORD = 3 ),\n"); printf(" - lexicographical with inverse\n"); printf(" exponent vector ( EVORD = 4 ).\n"); printf(" EVORD = "); EVORD = getsi();/* list of polynomials over Z */ printf("\n Enter a list of polynomials over Z/pZ in the form\n"); printf(" { p1 ... pm }\n"); printf(" where each polynomial pi ends with a '#'.\n "); PL = getdipmipl(r,p,VL);/* computation of the Groebner basis */ printf("\n normal / recursive method ? 1 / 0 : "); met = getsi(); if ( met == 1 ) PL1 = dipmipgb(r,p,PL); /* <---- normal Groebner basis algorithm ---- */ else PL1 = dipmipgbr(r,p,PL); /* <---- recursive Groebner basis algorithm ---- *//* output */ printf("\n Groebner basis:"); putdipmipl(r,p,PL1,VL);}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -