Changeset 27d4bb in git
- Timestamp:
- Oct 18, 2010, 3:32:34 PM (13 years ago)
- Branches:
- (u'spielwiese', 'd1b01e9d51ade4b46b745d3bada5c5f3696be3a8')
- Children:
- 45d2830f44d33be662443953b983c65ea1f6c01a
- Parents:
- bb4a16850326367ce586be55d83be2ed7f7ed811
- Location:
- Singular/LIB
- Files:
-
- 12 edited
Legend:
- Unmodified
- Added
- Removed
-
Singular/LIB/KVequiv.lib
rbb4a16 r27d4bb 1 // $Id$2 // (anne, last modified 27.11.2001)3 /////////////////////////////////////////////////////////////////////////////4 // LIBRARY HEADER5 1 ///////////////////////////////////////////////////////////////////////////// 6 2 -
Singular/LIB/ainvar.lib
rbb4a16 r27d4bb 1 // $Id$2 1 ///////////////////////////////////////////////////////////////////////////// 3 2 version="$Id$"; -
Singular/LIB/aksaka.lib
rbb4a16 r27d4bb 1 //CM, last modified 10.12.062 1 /////////////////////////////////////////////////////////////////////////////// 3 2 version="$Id$"; -
Singular/LIB/all.lib
rbb4a16 r27d4bb 1 // $Id$2 1 /////////////////////////////////////////////////////////////////////////////// 3 2 version="$Id$"; -
Singular/LIB/all.lib.tmpl
rbb4a16 r27d4bb 1 // $Id$2 1 /////////////////////////////////////////////////////////////////////////////// 3 2 version="$Id$"; -
Singular/LIB/assprimeszerodim.lib
rbb4a16 r27d4bb 28 28 29 29 proc zeroRadical(ideal I, list #) 30 "USAGE: zeroRadical(I,[n]); I ideal, optional: n number of processors (for 30 "USAGE: zeroRadical(I,[n]); I ideal, optional: n number of processors (for 31 31 parallel computing) 32 32 ASSUME: I is zero-dimensional in Q[variables] … … 49 49 50 50 static proc zeroR(ideal I, list #) 51 // compute the radical of I provided that I is zero-dimensional in Q[variables] 51 // compute the radical of I provided that I is zero-dimensional in Q[variables] 52 52 // and a standard basis 53 53 { -
Singular/LIB/cimonom.lib
rbb4a16 r27d4bb 1 /////////////////////////////////////////////////////////////////////////////// ///////1 /////////////////////////////////////////////////////////////////////////////// 2 2 version = "$Id$"; 3 3 category="Commutative Algebra"; -
Singular/LIB/curvepar.lib
rbb4a16 r27d4bb 1 /////////////////////////////////////////////////////////////////////////////// /////1 /////////////////////////////////////////////////////////////////////////////// 2 2 version="$Id$"; 3 3 category="Singularities"; -
Singular/LIB/modstd.lib
rbb4a16 r27d4bb 67 67 def R = basering; 68 68 setring R; 69 69 70 70 attrib(J,"isSB",1); 71 71 int i,j,k; … … 82 82 //link l(i) = "ssi:fork"; 83 83 open(l(i)); 84 84 85 85 write(l(i), quote(redFork(eval(I[ncols(I)-i]), eval(J), 1))); 86 86 } … … 106 106 { 107 107 if(status(l(i), "read", "ready")) 108 { 108 { 109 109 if(read(l(i)) != 0) 110 110 { … … 252 252 proc deleteUnluckyPrimes(list T, list L, int ho, list #) 253 253 "USAGE: deleteUnluckyPrimes(T,L,ho,#); T/L list of polys/primes, ho integer 254 RETURN: lists T,L(,M),lT with T/L(/M) list of polys/primes(/type of #), 254 RETURN: lists T,L(,M),lT with T/L(/M) list of polys/primes(/type of #), 255 255 lT ideal 256 256 NOTE: - if ho = 1, the polynomials in T are homogeneous, else ho = 0, … … 518 518 "USAGE: modpStd(I,p,variant,#); I ideal, p integer, variant integer 519 519 ASSUME: If size(#) > 0, then #[1] is an intvec describing the Hilbert series. 520 RETURN: ideal - a standard basis of I mod p, integer - p 520 RETURN: ideal - a standard basis of I mod p, integer - p 521 521 NOTE: The procedure computes a standard basis of the ideal I modulo p and 522 522 fetches the result to the basering. If size(#) > 0 the Hilbert driven … … 551 551 } 552 552 } 553 553 554 554 if((variant == 2) || (variant == 5)) 555 555 { … … 603 603 kill HomR; 604 604 } 605 605 606 606 setring R0; 607 607 return(list(fetch(@r,i),p)); … … 626 626 ASSUME: If size(#) > 0, then # contains either 1, 2 or 4 integers such that 627 627 @* - #[1] is the number of available processors for the computation 628 (parallelization is just applicable using 32-bit Singular 629 version since MP-links are not compatible with 64-bit Singular 628 (parallelization is just applicable using 32-bit Singular 629 version since MP-links are not compatible with 64-bit Singular 630 630 version), 631 631 @* - #[2] is an optional parameter for the exactness of the computation, … … 639 639 result is a standard basis containing I and with high probability 640 640 a standard basis of I. 641 By default the procedure computes a standard basis of I for sure, but 642 if the optional parameter #[2] = 0, it computes a standard basis of I 641 By default the procedure computes a standard basis of I for sure, but 642 if the optional parameter #[2] = 0, it computes a standard basis of I 643 643 with high probability and a warning appears at the end. 644 644 The procedure distinguishes between different variants for the standard … … 665 665 if((npars(R0) > 0) || (rl[1] > 0)) 666 666 { 667 ERROR("Characteristic of basering should be zero, basering should 667 ERROR("Characteristic of basering should be zero, basering should 668 668 have no parameters."); 669 669 } … … 737 737 //------------------------- Save current options ----------------------------- 738 738 intvec opt = option(get); 739 739 740 740 option(redSB); 741 741 … … 755 755 if(h) 756 756 { 757 if(exactness == 0) 758 { 759 variant = 1; 760 if(printlevel >= 10) { "variant = 1"; } 761 } 762 if(exactness == 1) 763 { 764 variant = 4; 765 if(printlevel >= 10) { "variant = 4"; } 757 if(exactness == 0) 758 { 759 variant = 1; 760 if(printlevel >= 10) { "variant = 1"; } 761 } 762 if(exactness == 1) 763 { 764 variant = 4; 765 if(printlevel >= 10) { "variant = 4"; } 766 766 } 767 767 rl[1] = L[5]; … … 798 798 if(system("nblocks") <= 2) 799 799 { 800 if(find(ordstr_R0, "M") + find(ordstr_R0, "lp") 800 if(find(ordstr_R0, "M") + find(ordstr_R0, "lp") 801 801 + find(ordstr_R0, "rp") <= 0) 802 802 { … … 830 830 if(printlevel >= 10) { "variant = 6"; } 831 831 } 832 832 833 833 rl[1] = L[5]; 834 834 def @r = ring(rl); … … 861 861 if(h) 862 862 { 863 variant = 1; if(printlevel >= 10) { "variant = 1"; } 863 variant = 1; if(printlevel >= 10) { "variant = 1"; } 864 864 rl[1] = L[5]; 865 865 def @r = ring(rl); … … 887 887 if(system("nblocks") <= 2) 888 888 { 889 if(find(ordstr_R0, "M") + find(ordstr_R0, "lp") 889 if(find(ordstr_R0, "M") + find(ordstr_R0, "lp") 890 890 + find(ordstr_R0, "rp") <= 0) 891 891 { … … 903 903 variant = 3; 904 904 if(printlevel >= 10) { "variant = 3"; } 905 905 906 906 rl[1] = L[5]; 907 907 def @r = ring(rl); … … 929 929 } 930 930 } 931 931 932 932 list P,T1,T2,T3,LL; 933 933 … … 949 949 link l(i) = "MPtcp:fork"; 950 950 open(l(i)); 951 if((variant == 1) || (variant == 3) || 951 if((variant == 1) || (variant == 3) || 952 952 (variant == 4) || (variant == 6)) 953 953 { 954 write(l(i), quote(modpStd(I_for_fork, eval(L[i + 1]), 954 write(l(i), quote(modpStd(I_for_fork, eval(L[i + 1]), 955 955 eval(variant), eval(hi)))); 956 956 } 957 957 if((variant == 2) || (variant == 5)) 958 958 { 959 write(l(i), quote(modpStd(I_for_fork, eval(L[i + 1]), 959 write(l(i), quote(modpStd(I_for_fork, eval(L[i + 1]), 960 960 eval(variant)))); 961 961 } … … 996 996 { 997 997 //--- ask if link l(i) is ready otherwise sleep for t seconds --- 998 if(status(l(i), "read", "ready")) 998 if(status(l(i), "read", "ready")) 999 999 { 1000 1000 //--- read the result from l(i) --- 1001 P = read(l(i)); 1001 P = read(l(i)); 1002 1002 T1[index] = P[1]; 1003 1003 T2[index] = bigint(P[2]); … … 1006 1006 if(j <= size(L)) 1007 1007 { 1008 if((variant == 1) || (variant == 3) || 1008 if((variant == 1) || (variant == 3) || 1009 1009 (variant == 4) || (variant == 6)) 1010 1010 { 1011 write(l(i), quote(modpStd(I_for_fork, eval(L[j]), 1011 write(l(i), quote(modpStd(I_for_fork, eval(L[j]), 1012 1012 eval(variant), eval(hi)))); 1013 1013 j++; … … 1015 1015 if((variant == 2) || (variant == 5)) 1016 1016 { 1017 write(l(i), quote(modpStd(I_for_fork, 1017 write(l(i), quote(modpStd(I_for_fork, 1018 1018 eval(L[j]), eval(variant)))); 1019 1019 j++; … … 1028 1028 } 1029 1029 //--- k describes the number of closed links --- 1030 if(k == n1) 1030 if(k == n1) 1031 1031 { 1032 1032 j++; … … 1039 1039 while(j <= size(L)) 1040 1040 { 1041 if((variant == 1) || (variant == 3) || 1041 if((variant == 1) || (variant == 3) || 1042 1042 (variant == 4) || (variant == 6)) 1043 1043 { … … 1083 1083 tt = timer; rt = rtimer; 1084 1084 if(pd > 2) { "list of primes:"; L; "pTest"; } 1085 if((variant == 1) || (variant == 3) || (variant == 4) || (variant == 6)) 1086 { 1087 pTest = pTestSB(I,J,L,variant,hi); 1088 } 1089 if((variant == 2) || (variant == 5)) 1090 { 1091 pTest = pTestSB(I,J,L,variant); 1085 if((variant == 1) || (variant == 3) || (variant == 4) || (variant == 6)) 1086 { 1087 pTest = pTestSB(I,J,L,variant,hi); 1088 } 1089 if((variant == 2) || (variant == 5)) 1090 { 1091 pTest = pTestSB(I,J,L,variant); 1092 1092 } 1093 1093 … … 1097 1097 "Real-time for pTest is "+string(rtimer - rt)+" seconds."; 1098 1098 } 1099 1099 1100 1100 if(pTest) 1101 1101 { … … 1104 1104 "CPU-time for computation without final tests is 1105 1105 "+string(timer - TT)+" seconds."; 1106 "Real-time for computation without final tests is 1106 "Real-time for computation without final tests is 1107 1107 "+string(rtimer - RT)+" seconds."; 1108 1108 } … … 1114 1114 if(printlevel >= 10) 1115 1115 { 1116 "CPU-time for checking if I subset <G> is 1116 "CPU-time for checking if I subset <G> is 1117 1117 "+string(timer - tt)+" seconds."; 1118 "Real-time for checking if I subset <G> is 1118 "Real-time for checking if I subset <G> is 1119 1119 "+string(rtimer - rt)+" seconds."; 1120 1120 } … … 1138 1138 if(printlevel >= 10) 1139 1139 { 1140 "CPU-time for last std-computation is 1140 "CPU-time for last std-computation is 1141 1141 "+string(timer - tt)+" seconds."; 1142 "Real-time for last std-computation is 1142 "Real-time for last std-computation is 1143 1143 "+string(rtimer - rt)+" seconds."; 1144 1144 } … … 1171 1171 { 1172 1172 open(l(i)); 1173 if((variant == 1) || (variant == 3) || 1173 if((variant == 1) || (variant == 3) || 1174 1174 (variant == 4) || (variant == 6)) 1175 1175 { 1176 write(l(i), quote(modpStd(I_for_fork, eval(L[j+i-1]), 1176 write(l(i), quote(modpStd(I_for_fork, eval(L[j+i-1]), 1177 1177 eval(variant), eval(hi)))); 1178 1178 } 1179 1179 if((variant == 2) || (variant == 5)) 1180 1180 { 1181 write(l(i), quote(modpStd(I_for_fork, eval(L[j+i-1]), 1181 write(l(i), quote(modpStd(I_for_fork, eval(L[j+i-1]), 1182 1182 eval(variant)))); 1183 1183 } … … 1209 1209 size(reduce(J1,J2)); 1210 1210 size(reduce(J2,J1)); 1211 1211 1212 1212 /* 1213 1213 ring R4 = 0,x(1..4),wp(1,-1,-1,1); … … 1235 1235 list T; 1236 1236 list rl = ringlist(R0); 1237 if((npars(R0)>0) || (rl[1]>0)) 1238 { 1239 ERROR("Characteristic of basering should be zero."); 1237 if((npars(R0)>0) || (rl[1]>0)) 1238 { 1239 ERROR("Characteristic of basering should be zero."); 1240 1240 } 1241 1241 for(j = 1; j <= size(L); j++) … … 1258 1258 kill @r; 1259 1259 } 1260 L = deleteUnluckyPrimes(T,L,homog(I)); 1260 L = deleteUnluckyPrimes(T,L,homog(I)); 1261 1261 // unlucky if and only if the leading ideal is wrong 1262 1262 J = farey(chinrem(L[1],L[2]),N); -
Singular/LIB/resbin.lib
rbb4a16 r27d4bb 1 // rocio, last modified 23.05.102 1 //////////////////////////////////////////////////////////////////////////// 3 2 version="$Id: resbin.lib$"; -
Singular/LIB/standard.lib
rbb4a16 r27d4bb 16 16 qslimgb(i) computes a standard basis with slimgb in a qring 17 17 par2varRing([i]) create a ring making pars to vars, together with i 18 datetime() 18 datetime() return date and time as a string 19 19 20 20 "; -
Singular/LIB/template.lib
rbb4a16 r27d4bb 47 47 Help is in pure Texinfo. 48 48 @*This help string is written in texinfo, which enables you to use, 49 among others, the @@math command for mathematical typesetting 49 among others, the @@math command for mathematical typesetting 50 50 (for instance, to print @math{\alpha, \beta}). 51 51 @*Texinfo also gives more control over the layout, but is, admittingly, … … 76 76 @* Use @math for simple math mode typesetting (e.g., @math{i_1}). 77 77 @* Warning: Parenthesis like } are not allowed inside @math and @code. 78 @* Use @example for indented, preformatted text typesetting in 78 @* Use @example for indented, preformatted text typesetting in 79 79 typewriter font: 80 80 @example
Note: See TracChangeset
for help on using the changeset viewer.