Changeset 35f51c1 in git
- Timestamp:
- Mar 19, 2014, 9:03:08 PM (10 years ago)
- Branches:
- (u'spielwiese', '8e0ad00ce244dfd0756200662572aef8402f13d5')
- Children:
- c0bbad6254e42ef9e4bed7c8d91f31a7c9f7ba50
- Parents:
- 78d77686cc4b5fc9f6f797bc4ca23dc1ca4c751c23f745157ee6c94377957e40ac2de34bd6812b90
- Files:
-
- 3 added
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
Singular/LIB/tropical.lib
r23f745 r35f51c1 531 531 // to start all over again; 532 532 // this is controlled by the while-loop 533 intvec ordnungskontrollvektor=N,-w[2]; // used with the option puiseux 533 534 while (size(liftrings)==0) 534 535 { … … 540 541 else // use absolute primary decomposition 541 542 { 542 list TP=tropicalparametrise(i,w,ordnung, gfanold,findall,nogfan,puiseux,ini);543 list TP=tropicalparametrise(i,w,ordnung,ordnungskontrollvektor,gfanold,findall,nogfan,puiseux,ini); 543 544 } 544 545 // compute the liftrings by resubstitution … … 731 732 w=precutdownw; 732 733 */ 733 ~ 734 734 735 } 735 736 } … … 741 742 } 742 743 /////////////////////////////////////////////////////////// 743 if ( voice+printlevel>=2)744 if (printlevel-voice+2>=0) 744 745 { 745 746 … … 777 778 { 778 779 "EXAMPLE:"; 780 int oldprintlevel=printlevel; 781 printlevel=1; 779 782 echo=2; 780 783 //////////////////////////////////////////////////////// … … 823 826 setring R; 824 827 displayTropicalLifting(LIST,"subst"); 828 printlevel=oldprintlevel; 825 829 } 826 830 … … 966 970 RETURN: list, where each entry of the list l describes the Newton-Puiseux 967 971 @* parametrisations of one branch of the plane curve singularity 968 @* at the origin defined by f; only the first n termsof each972 @* at the origin defined by f; only the terms up to order n of each 969 973 @* parametetrisation are computed 970 974 @* l[i][1] = is a ring … … 979 983 the new base field will have a parameter and a new minimal polynomial, 980 984 and LIFT[2] describes how the old parameter can be computed from the new one 985 @* - if a field extension with minimal polynomial of degree k was necessary, 986 then to the one extension produced acutally k extensions correspond by replacing 987 the parameter a successively by all zeros of the minimal polynomial 981 988 @* - if the option subst was set l[i][3] contains the polynomial where 982 989 y has been substituted by y(t^{1/N}) as a string … … 1155 1162 "EXAMPLE:"; 1156 1163 echo=2; 1164 printlevel=1; 1157 1165 ring r=0,(x,y),ds; 1158 1166 poly f=x2-y4+x5y7; … … 4678 4686 "AND HIT THE RETURN BUTTON TWICE (!!!) - NOTE, THE LAST 0 IS OMITTED"; 4679 4687 "IF YOU WANT wneu TO BE TESTED, THEN SET goon=0;"; 4680 ~ 4688 4681 4689 // THIS IS NOT NECESSARY !!!! IF WE COMPUTE NOT ONLY THE 4682 4690 // TROPICAL PREVARIETY … … 4687 4695 { 4688 4696 "CHOOSE A DIFFERENT RAY"; 4689 ~ 4697 4690 4698 } 4691 4699 else … … 4724 4732 { 4725 4733 "Set intvec wneu!"; 4726 ~ 4734 4727 4735 } 4728 4736 } … … 5548 5556 /////////////////////////////////////////////////////////////////////////////// 5549 5557 5550 static proc tropicalparametrise (ideal i,intvec ww,int ordnung,int gfanold,int findall,int nogfan,int puiseux,list #)5558 static proc tropicalparametrise (ideal i,intvec ww,int ordnung,intvec ordnungskontrollvektor,int gfanold,int findall,int nogfan,int puiseux,list #) 5551 5559 "USAGE: tropicalparametrise(i,tw,ord,gf,fa,ng,pu[,#]); i ideal, tw intvec, ord int, gf,fa,ng,pu int, # opt. list 5552 5560 ASSUME: - i is an ideal in Q[t,x_1,...,x_n,@a], tw=(w_0,w_1,...,w_n,0) … … 5620 5628 list wneulist; // carries all newly computed weight vector 5621 5629 intvec wneu; // carries the newly computed weight vector 5630 intvec okvneu; // carries the newly computed ordnungskontrollvektor 5622 5631 int tweight; // carries the weight of t 5623 5632 list PARALIST; // carries the result when tropicalparametrise … … 5722 5731 "AND HIT THE RETURN BUTTON - NOTE, THE LAST 0 IS OMITTED"; 5723 5732 "IF YOU WANT wneu TO BE TESTED, THEN SET goon=0;"; 5724 ~ 5733 5725 5734 // THIS IS NOT NECESSARY !!!! IF WE COMPUTE NOT ONLY 5726 5735 // THE TROPICAL PREVARIETY … … 5731 5740 { 5732 5741 "CHOOSE A DIFFERENT RAY"; 5733 ~ 5742 5734 5743 } 5735 5744 else … … 5793 5802 { 5794 5803 "Set wneulist!"; 5795 ~ 5804 5796 5805 } 5797 5806 else 5798 5807 { 5799 5808 "Set intvec wneu!"; 5800 ~ 5809 5801 5810 wneulist[1]=wneu; 5802 5811 } … … 5810 5819 // if all variables were deleted, then i=0 and thus anzahlvariablen==0 5811 5820 lll=0; 5812 if (( ordnung>1) and (anzahlvariablen>1))5821 if (((puiseux==0) and (ordnung>1)) or ((puiseux==1) and (ordnungskontrollvektor[2]<ordnungskontrollvektor[1]*ordnung)) and (anzahlvariablen>1)) 5813 5822 { 5814 5823 partliftings=list(); // initialise partliftings … … 5822 5831 { 5823 5832 wneu=wneulist[kk]; 5824 PARALIST=tropicalparametrise(i,wneu,ordnung-1,gfanold,findall,nogfan,puiseux,anzahlvariablen,zero); 5833 okvneu=-ordnungskontrollvektor[1]*wneu[1],-ordnungskontrollvektor[2]*wneu[1]-wneu[2]; 5834 if (puiseux==0) 5835 { 5836 PARALIST=tropicalparametrise(i,wneu,ordnung-1,okvneu,gfanold,findall,nogfan,puiseux,anzahlvariablen,zero); 5837 } 5838 else 5839 { 5840 PARALIST=tropicalparametrise(i,wneu,ordnung,okvneu,gfanold,findall,nogfan,puiseux,anzahlvariablen,zero); 5841 } 5825 5842 // the output will be a ring, in which the 5826 5843 // parametrisation lives, and a string, which contains -
Tst/Short.lst
r78d776 r35f51c1 126 126 Short/bug_tr549.tst 127 127 Short/bug_x_i_j.tst 128 Short/charseries.tst 128 129 Short/classify_s.tst 129 130 Short/cyc5_lp.tst -
Tst/Short/ok_s.lst
r78d776 r35f51c1 134 134 bug_x_i_j 135 135 brnoeth_s 136 charseries 136 137 countedref_s 137 138 classify_s -
factory/canonicalform.cc
r78d776 r35f51c1 17 17 #include "gfops.h" 18 18 #include "facMul.h" 19 #include "FLINTconvert.h" 19 20 20 21 #include <factory/cf_gmp.h> 21 22 22 23 23 #ifndef NOSTREAMIO -
factory/libfac/charset/alg_factor.cc
r78d776 r35f51c1 1030 1030 newfactoras( const CanonicalForm & f, const CFList & as, int &success) 1031 1031 { 1032 bool isRat= isOn (SW_RATIONAL); 1033 if (!isRat) 1034 On (SW_RATIONAL); 1032 1035 Variable vf=f.mvar(); 1033 1036 CFListIterator i; … … 1050 1053 // ||( (as.length()==1) && (degree(f,vf)==3) && (degree(as.getFirst()==2)) ) 1051 1054 DEBDECLEVEL(CERR,"newfactoras"); 1055 if (!isRat) 1056 Off (SW_RATIONAL); 1052 1057 return CFFList(CFFactor(f,1)); 1053 1058 } … … 1079 1084 if ( Astar.length() == 0 ){ 1080 1085 DEBDECLEVEL(CERR,"newfactoras"); 1086 if (!isRat) 1087 Off (SW_RATIONAL); 1081 1088 return CFFList(CFFactor(f,1)); 1082 1089 } … … 1110 1117 CFFList result= newfactoras (Ggcd,as,success); //Ggcd is the squarefree part of f 1111 1118 multiplicity (result, f, Astar); 1119 if (!isRat) 1120 Off (SW_RATIONAL); 1112 1121 return result; 1113 1122 } … … 1116 1125 Fgcd= pp(Fgcd); Ggcd= pp(Ggcd); 1117 1126 DEBDECLEVEL(CERR,"newfactoras"); 1127 if (!isRat) 1128 Off (SW_RATIONAL); 1118 1129 return myUnion(newfactoras(Fgcd,as,success) , newfactoras(Ggcd,as,success)); 1119 1130 } 1120 1131 if ( getCharacteristic() > 0 ) 1121 1132 { 1133 if (!isRat) 1134 Off (SW_RATIONAL); 1122 1135 // First look for extension! 1123 1136 IntList degreelist; … … 1164 1177 Variable vminpoly; 1165 1178 Factorlist= alg_factor(f, Astar, vminpoly, oldord, as, isFunctionField); 1166 DEBDECLEVEL(CERR,"newfactoras"); 1167 return Factorlist; 1179 DEBDECLEVEL(CERR,"newfactoras"); 1180 if (!isRat) 1181 Off (SW_RATIONAL); 1182 return Factorlist; 1168 1183 } 1169 1184 … … 1175 1190 newcfactor(const CanonicalForm & f, const CFList & as, int & success ) 1176 1191 { 1177 On (SW_RATIONAL); 1192 bool isRat= isOn (SW_RATIONAL); 1193 if (!isRat) 1194 On (SW_RATIONAL); 1178 1195 CFFList Output, output, Factors= factorize(f); 1179 1196 if (Factors.getFirst().factor().inCoeffDomain()) … … 1182 1199 if ( as.length() == 0 ) 1183 1200 { 1201 if (!isRat) 1202 Off (SW_RATIONAL); 1184 1203 success=1; 1185 1204 return Factors; … … 1187 1206 if ( cls(f) <= cls(as.getLast()) ) 1188 1207 { 1208 if (!isRat) 1209 Off (SW_RATIONAL); 1189 1210 success=1; 1190 1211 return Factors; … … 1198 1219 Output = myappend(Output,CFFactor(j.getItem().factor(),j.getItem().exp()*i.getItem().exp())); 1199 1220 } 1221 1222 if (!isRat) 1223 Off (SW_RATIONAL); 1200 1224 return Output; 1201 1225 } -
kernel/feread.cc
r23f745 r35f51c1 51 51 * start at the top of the list. 52 52 */ 53 #include <Singular/ipid.h> 53 54 extern "C" 54 55 char *command_generator (char *text, int state) 55 56 { 56 57 static int list_index, len; 57 char *name; 58 static idhdl h; 59 const char *name; 58 60 59 61 /* If this is a new word to complete, initialize now. This includes … … 64 66 list_index = 1; 65 67 len = strlen (text); 68 h=basePack->idroot; 66 69 } 67 70 … … 74 77 return (strdup(name)); 75 78 } 76 79 if (len>1) 80 { 81 while (h!=NULL) 82 { 83 name=h->id; 84 h=h->next; 85 if (strncmp (name, text, len) == 0) 86 return (strdup(name)); 87 } 88 } 77 89 /* If no names matched, then return NULL. */ 78 90 return ((char *)NULL);
Note: See TracChangeset
for help on using the changeset viewer.