Changeset ad31e89 in git
- Timestamp:
- Aug 7, 2019, 3:44:23 PM (4 years ago)
- Branches:
- (u'spielwiese', 'd1ba061a762c62d3a25159d8da8b6e17332291fa')
- Children:
- 4afedc31e655bd54e5f31232d2e6044d42600468
- Parents:
- be587d0fcc62a833c7e54e892e55d28bc35a7b35621203ad7373159254c97525b77e9edda2f36c37
- git-author:
- Hans Schoenemann <hannes@mathematik.uni-kl.de>2019-08-07 15:44:23+02:00
- git-committer:
- GitHub <noreply@github.com>2019-08-07 15:44:23+02:00
- Files:
-
- 16 edited
Legend:
- Unmodified
- Added
- Removed
-
Singular/LIB/assprimeszerodim.lib
rbe587d rad31e89 284 284 { 285 285 def R = basering; 286 execute("ring QT = ("+charstr(R)+"), "+varstr(R, nvars(R))+", dp;");286 ring QT = create_ring(ringlist(R)[1], varstr(R, nvars(R)), "dp", "no_minpoly"); 287 287 setring(R); 288 288 map phi = QT, f; … … 349 349 M[1..d, j] = coeffs(reduce(f*basis[j], J), basis, vars); 350 350 } 351 execute("ring QT = ("+charstr(R)+"), "+varstr(R, nvars(R))+", dp;");351 ring QT = create_ring(ringlist(R)[1], varstr(R, nvars(R)), "dp", "no_minpoly"); 352 352 matrix M = imap(R, M); 353 353 ideal F = det(M-var(1)*freemodule(d)); -
Singular/LIB/classify.lib
rbe587d rad31e89 256 256 PhiG = MapReduce(PhiG); 257 257 258 execute("ring RingB="+charstr(basering)+",("+A_Z("x",corank)+"),(c,ds);");258 ring RingB = create_ring(ringlist(basering)[1], "("+A_Z("x",corank)+")", "(c,ds)", "no_minpoly"); 259 259 export RingB; 260 260 setring ring_rest; -
Singular/LIB/equising.lib
rbe587d rad31e89 1399 1399 1400 1400 def old_ring=basering; 1401 execute("ring @myRing=("+charstr(basering)+"),("+varstr(basering)+"),ds;");1401 ring @myRing = create_ring(ringlist(basering)[1], "("+varstr(basering)+")", "ds", "no_minpoly"); 1402 1402 poly f=imap(old_ring,f); 1403 1403 -
Singular/LIB/gmssing.lib
rbe587d rad31e89 196 196 } 197 197 198 execute("ring G="+string(charstr(@R))+",("+s+","+varstr(@R)+"),(ws("+ 199 string(deg(highcorner(g))+2*gmsmaxdeg)+"),"+os+",c);"); 198 ring G = create_ring(string(charstr(@R)), "("+s+","+varstr(@R)+")", "(ws("+string(deg(highcorner(g))+2*gmsmaxdeg)+"),"+os+",c)"); 200 199 201 200 poly gmspoly=imap(@R,t); -
Singular/LIB/graal.lib
rbe587d rad31e89 358 358 else 359 359 { string pars; string vars = varstr(basering); } 360 execute("ring Q0 = ("+charstr(basering)+pars+"),("+vars+"),dp;");360 ring Q0 = create_ring("("+charstr(basering)+pars+")", "("+vars+")", "dp"); 361 361 ideal J0 = imap(Q,J); 362 362 Gr.Q0 = Q0; -
Singular/LIB/mprimdec.lib
rbe587d rad31e89 224 224 { 225 225 def BAS=basering; 226 execute("ring Rloc=("+charstr(basering)+","+varstr(basering)+"),dummy,(C,dp);");226 ring Rloc = create_ring("("+charstr(basering)+","+varstr(basering)+")", "dummy", "(C,dp)"); 227 227 module @N=imap(BAS, @N); 228 228 poly @q=prepareSat(@N); … … 634 634 if(size(ann)==0) 635 635 { 636 execute("ring Rloc=("+charstr(basering)+","+varstr(basering)+"),dummy,(C,dp);");636 ring Rloc = create_ring("("+charstr(basering)+","+varstr(basering)+")", "dummy", "(C,dp)"); 637 637 module @N=imap(BAS, @N); 638 638 poly @q=prepareSat(@N); … … 1424 1424 if(size(ann)==0) //check, whether ann=0 1425 1425 { 1426 execute("ring Rloc=("+charstr(basering)+","+varstr(basering)+"),dummy,(C,dp);");1426 ring Rloc = create_ring("("+charstr(basering)+","+varstr(basering)+")", "dummy", "(C,dp)"); 1427 1427 module @N=clrSBmod(imap(BAS, @N)); 1428 1428 module @M=freemodule(nrows(@N)); … … 1553 1553 ring RAU = create_ring(ringlist(basering)[1], "("+indep[@k1][@k2][1]+","+indep[@k1][@k2][2]+")", indep[@k1][@k2][3], "no_minpoly"); 1554 1554 module @N=std(imap(BAS,@N)); // the standard basis in (R[U])[A] 1555 execute("ring Rloc=("+charstr(basering)+","+indep[@k1][@k2][2]+"),("+indep[@k1][@k2][1]+"),(C,dp);");1555 ring Rloc = create_ring("("+charstr(basering)+","+indep[@k1][@k2][2]+")", "("+indep[@k1][@k2][1]+")", "(C,dp)"); 1556 1556 module @N=imap(RAU,@N); //std in lokalisierung 1557 1557 @N=clrSBmod(@N); -
Singular/LIB/paraplanecurves.lib
rbe587d rad31e89 1616 1616 poly p=beta(p); 1617 1617 1618 execute("ring C=("+charstr(S)+",a),("+varstr(S)+"),ds;");1618 ring C = create_ring("("+charstr(S)+",a)", "("+varstr(S)+")", "ds"); 1619 1619 number p=number(imap(B,p)); 1620 1620 minpoly=p; -
Singular/LIB/primitiv.lib
rbe587d rad31e89 341 341 342 342 //---------------- Minimalpolynom in ein Polynom umwandeln: ----------------- 343 execute("ring splt2="+charakt+","+algname+",dp;");343 ring splt2 = create_ring(charakt, algname, "dp"); 344 344 execute("poly mipol="+minp+";"); 345 345 // f ist Polynom in algname und einer weiteren Variablen -> mache f bivariat: 346 execute("ring splt3="+charakt+",("+algname+","+varnames+"),dp;");346 ring splt3 = create_ring(charakt, "("+algname+","+varnames+")", "dp"); 347 347 poly f=imap(altring,f); 348 348 349 349 //-------------- Vorbereitung des Aufrufes von primitive: ------------------- 350 execute("ring splt1="+charakt+",(x,y),dp;");350 ring splt1 = create_ring(charakt, "(x,y)", "dp"); 351 351 ideal abbnach=x; 352 352 for (i=1; i<=anzvar; i++) { abbnach=abbnach,y; } … … 364 364 if (printlevel > -1) { "// new minimal polynomial:",minp; } 365 365 //--------------------- definiere den neuen Ring: --------------------------- 366 execute("ring neuring = ("+charakt+","+algname+"),("+varnames+"),(" 367 +ordstr(altring)+");"); 366 ring neuring = create_ring("("+charakt+","+algname+")", "("+varnames+")", "("+ordstr(altring)+")"); 368 367 execute("minpoly="+minp+";"); 369 368 -
Singular/LIB/rwalk.lib
rbe587d rad31e89 209 209 int printout=0; 210 210 def xR = basering; 211 execute("ring ostR = "+charstr(xR)+",("+varstr(xR)+"),"+ord_str+";");211 ring ostR = create_ring(ringlist(xR)[1], "("+varstr(xR)+")", ord_str, "no_minpoly"); 212 212 def old_ring = basering; 213 213 … … 261 261 int printout=0; 262 262 def xR = basering; 263 execute("ring ostR = ("+charstr(xR)+"),("+varstr(xR)+"),"+ord_str+";");263 ring ostR = create_ring(ringlist(xR)[1], "("+varstr(xR)+")", ord_str, "no_minpoly"); 264 264 def old_ring = basering; 265 265 … … 310 310 def xR = basering; 311 311 312 execute("ring ostR = ("+charstr(xR)+"),("+varstr(xR)+"),"+ord_str+";");312 ring ostR = create_ring(ringlist(xR)[1], "("+varstr(xR)+")", ord_str, "no_minpoly"); 313 313 def old_ring = basering; 314 314 //print("//** help ring = " + string(basering)); -
Singular/LIB/solve.lib
rbe587d rad31e89 700 700 if (oldr!=1) 701 701 { 702 execute("ring rinC =(complex,"+string(outprec)+ 703 "),("+varstr(basering)+"),lp;"); 702 ring rinC = create_ring("(complex,"+string(outprec)+")", "("+varstr(basering)+")", "lp"); 704 703 list SOL; 705 704 if (mu==0){SOL[1] = zerolist(nv);} … … 771 770 if (oldr!=1) 772 771 { 773 execute("ring rinC =(complex,"+string(outprec)+"),("+varstr(basering)+"),lp;");772 ring rinC = create_ring("(complex,"+string(outprec)+")", "("+varstr(basering)+")", "lp"); 774 773 list SOL; 775 774 for (ii=1; ii<=size(L); ii++ ) { execute("SOL[ii]=number("+L[ii]+");"); } … … 800 799 else 801 800 { 802 execute("ring internC=(complex,"+string(prec)+"),("+varstr(basering)+"),lp;");801 ring internC = create_ring("(complex,"+string(prec)+")", "("+varstr(basering)+")", "lp"); 803 802 ideal H = imap(hr,H); 804 803 list sp = splittolist(splitsqrfree(H[1],var(1))); … … 812 811 if (oldr!=1) 813 812 { 814 execute("ring rinC =(complex,"+string(outprec)+"),("+varstr(basering)+"),lp;");813 ring rinC = create_ring("(complex,"+string(outprec)+")", "("+varstr(basering)+")", "lp"); 815 814 list SOL; 816 815 list sp=imap(internC,sp); … … 878 877 if (outprec<prec) 879 878 { 880 execute("ring internC=(complex,"+string(prec)+"),("+varstr(hr)+"),lp;");879 ring internC = create_ring("(complex,"+string(prec)+")", "("+varstr(hr)+")", "lp"); 881 880 } 882 881 else 883 882 { 884 execute("ring rinC =(complex,"+string(outprec)+"),("+varstr(basering)+"),lp;");883 ring rinC = create_ring("(complex,"+string(outprec)+")", "("+varstr(basering)+")", "lp"); 885 884 } 886 885 list triC = imap(hr,sp); … … 941 940 if (oldr!=1) 942 941 { 943 execute("ring rinC =(complex,"+string(outprec)+"),("+varstr(basering)+"),lp;");942 ring rinC = create_ring("(complex,"+string(outprec)+")", "("+varstr(basering)+")", "lp"); 944 943 list SOL=imap(internC,ret1); 945 944 export SOL; … … 1436 1435 int ii,jj; 1437 1436 int nv=size(LL[1]); 1438 execute("ring rinC =(complex,"+string(prec)+",I),(" 1439 +varstr(basering)+"),lp;"); 1437 ring rinC = create_ring("(complex,"+string(prec)+",I)", "("+varstr(basering)+")", "lp"); 1440 1438 list SOL,SOLnew; 1441 1439 for (ii=1; ii<=sizeLL; ii++) -
Singular/LIB/standard.lib
rbe587d rad31e89 2517 2517 static proc parse_L1(string l1) 2518 2518 { 2519 if (find(l1, "(", 1) == 0) // no parentheses 2520 { 2521 return(int(l1)); 2522 } 2523 list tokens = tuple_to_tokens(l1); 2519 list tokens; 2520 if (l1[1] != "(") 2521 { 2522 tokens[1] = l1; 2523 } 2524 else 2525 { 2526 tokens = tuple_to_tokens(l1); 2527 } 2528 if (tokens[1] == "real") 2529 { 2530 int p1 = 6; 2531 int p2 = 6; 2532 if (size(tokens) > 1) 2533 { 2534 p1 = int(tokens[2]); 2535 p2 = p1; 2536 } 2537 if (size(tokens) > 2) 2538 { 2539 p2 = int(tokens[3]); 2540 } 2541 return(list(0, list(p1, p2))); 2542 } 2543 if (tokens[1] == "complex") 2544 { 2545 int p1 = 6; 2546 int p2 = 6; 2547 string imag_unit = "i"; 2548 if (int(tokens[size(tokens)]) == 0) // not an integer 2549 { 2550 imag_unit = tokens[size(tokens)]; 2551 tokens = delete(tokens, size(tokens)); 2552 } 2553 if (size(tokens) > 1) 2554 { 2555 p1 = int(tokens[2]); 2556 p2 = p1; 2557 } 2558 if (size(tokens) > 2) 2559 { 2560 p2 = int(tokens[3]); 2561 } 2562 return(list(0, list(p1, p2), imag_unit)); 2563 } 2524 2564 if (size(tokens) == 1) 2525 2565 { 2526 2566 return(int(tokens[1])); 2527 2567 } 2528 2568 list L = int(tokens[1]); … … 2537 2577 if (v[1, 4] == "var(" && defined(basering)) 2538 2578 { 2539 2540 2579 int i = int(v[5,size(v)-5]); 2580 v = ringlist(basering)[2][i]; 2541 2581 } 2542 2582 return(v); … … 2550 2590 static proc parse_L2(string l2) 2551 2591 { 2552 if ( find(l2, "(", 1) == 0) // no parentheses2553 { 2554 2592 if (l2[1] != "(") 2593 { 2594 return(list(parse_var(l2))); 2555 2595 } 2556 2596 list V = tuple_to_tokens(l2); 2557 2597 for (int i = size(V); i > 0; i--) 2558 2598 { 2559 2599 V[i] = parse_var(V[i]); 2560 2600 } 2561 2601 return(V); … … 2596 2636 int w = int(ordering[b1+1, b2-b1-1]); 2597 2637 } 2598 else 2638 if (name == "wp" || name == "Wp" || name == "ws" || name == "Ws" 2639 || name == "a") 2640 { 2641 intvec w = int(ordering[b1+1, b2-b1-1]); 2642 } 2643 if (!defined(w)) // else 2599 2644 { 2600 2645 intvec w = 1:int(ordering[b1+1, b2-b1-1]); -
Singular/LIB/surfex/Singular/surfex.lib
rbe587d rad31e89 298 298 string str_num_mp = "number "+parstr(1)+"="+ 299 299 decstr2ratstr(rootminpoly())+";"; 300 execute("ring Iring = 0,(" 301 // +string(coords)+","+str_para+"),dp;"); 302 +string(coords)+"),dp;"); 300 ring Iring = create_ring(0, "("+string(coords)+")", "dp"); 303 301 basering; 304 302 execute(str_num_mp); … … 320 318 string str_tmp_l = "ideal eqd_tmp = "+string(tmp_l)+";"; 321 319 def cur_ring = basering; 322 execute("ring Iring = (real,30),("+string(coords)+"),("+ordstr(oring)+");");320 ring Iring = create_ring("(real,30)", "("+string(coords)+")", "("+ordstr(oring)+")"); 323 321 // basering; 324 322 execute(str_I); … … 1011 1009 if(minp==1) { 1012 1010 // switch to a ring without minimal polynomial: 1013 execute("ring rr = (real,30,30),("+varstr(base)+"), dp;");1011 ring rr = create_ring("(real,30,30)", "("+varstr(base)+")", "dp"); 1014 1012 // rr; 1015 1013 // "str_I",str_I; … … 1032 1030 if(n-params==3) { 1033 1031 p=cleardenom(p); 1034 execute("ring rr = (real,30,30),("+varstr(base)+","+parstr(base)+"), dp;");1032 ring rr = create_ring("(real,30,30)", "("+varstr(base)+","+parstr(base)+")", "dp"); 1035 1033 rr; 1036 1034 "str_I",str_I; -
Singular/LIB/tropical.lib
rbe587d rad31e89 344 344 else 345 345 { 346 execute("ring BASERING=("+charstr(ALTERRING)+"),(t,x(1.."+string(nvars(ALTERRING)-1)+")),("+ordstr(ALTERRING)+");");346 ring BASERING = create_ring(ringlist(ALTERRING)[1], "(t,x(1.."+string(nvars(ALTERRING)-1)+"))", "("+ordstr(ALTERRING)+")", "no_minpoly"); 347 347 } 348 348 map altphi=ALTERRING,maxideal(1); … … 497 497 if (iszerodim==0) // do so only if is_dim_zero is not set 498 498 { 499 execute("ring QUOTRING=("+charstr(basering)+",t),("+string(variablen)+"),dp;");499 ring QUOTRING = create_ring("("+charstr(basering)+",t)", "("+string(variablen)+")", "dp"); 500 500 ideal i=groebner(imap(GRUNDRING,i)); 501 501 int dd=dim(i); … … 3952 3952 } 3953 3953 def BASERING=basering; 3954 execute("ring QUOTRING=("+charstr(basering)+",t),("+string(variablen)+"),dp;");3954 ring QUOTRING = create_ring("("+charstr(basering)+",t)", "("+string(variablen)+")", "dp"); 3955 3955 ideal i=subst(imap(BASERING,i),var(j-1),t^(-wj)*var(j-1)); 3956 3956 for (k=1;k<=size(i);k++) … … 4014 4014 // (needed for the initial-monomial-check later 4015 4015 } 4016 execute("ring QUOTRING=("+charstr(basering)+",t),("+string(variablen)+"),dp;");4016 ring QUOTRING = create_ring("("+charstr(basering)+",t)", "("+string(variablen)+")", "dp"); 4017 4017 setring BASERING; 4018 4018 // change to quotring where we want to compute the primary decomposition of i … … 5160 5160 if (anzahlvariablen<nvars(basering)) 5161 5161 { 5162 execute("ring TINRING=("+charstr(basering)+","+string(Parameter)+"),("+string(variablen)+"),dp;");5162 ring TINRING = create_ring("("+charstr(basering)+","+string(Parameter)+")", "("+string(variablen)+")", "dp"); 5163 5163 } 5164 5164 else … … 5185 5185 string PMet=string(par(1)); 5186 5186 def BASERING=basering; 5187 execute("ring r=0,"+PMet+",ls;");5187 ring r = create_ring(0, PMet, "ls"); 5188 5188 execute("poly denomi="+denom+";"); 5189 5189 execute("poly numer="+num+";"); … … 5718 5718 { 5719 5719 // pass to a ring which has variables which are suitable for gfan 5720 execute("ring GFANRING=("+string(char(basering))+"),(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X,Y,Z),dp;");5720 ring GFANRING = create_ring(string(char(basering)), "(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X,Y,Z)", "dp"); 5721 5721 ideal phiideal=b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X,Y,Z; 5722 5722 phiideal[nvars(PREGFANRING)]=a; // map t to a … … 5934 5934 if (anzahlvariablen<nvars(basering)) 5935 5935 { 5936 execute("ring PARARing=("+string(char(basering))+",@a),t,ls;");5936 ring PARARing = create_ring("("+string(char(basering))+",@a)", "t", "ls"); 5937 5937 minpoly=number(imap(PREGFANRING,m)); 5938 5938 } -
Singular/LIB/tropicalNewton.lib
rbe587d rad31e89 125 125 number c_denom = denominator(c); 126 126 number c_num = numerator(c); 127 execute("ring r_Val=0,"+string(uniformizingParameter)+",ds");127 ring r_Val = create_ring(0, string(uniformizingParameter), "ds"); 128 128 poly c_denom = imap(origin,c_denom); 129 129 poly c_num = imap(origin,c_num); -
factory/cf_inline.cc
r621203a rad31e89 143 143 CF_INLINE 144 144 CanonicalForm::CanonicalForm ( const int i ) 145 : value( CFFactory::basic( ( constlong)i ) )145 : value( CFFactory::basic( (long)i ) ) 146 146 { 147 147 } -
factory/imm.h
r621203a rad31e89 165 165 { 166 166 if ( is_imm( op ) == FFMARK ) 167 { 167 168 if ( cf_glob_switches.isOn( SW_SYMMETRIC_FF ) ) 168 169 return ff_symmetric( imm2int( op ) ); 169 170 else 170 171 return imm2int( op ); 171 else if ( is_imm( op ) == GFMARK ) { 172 } 173 else if ( is_imm( op ) == GFMARK ) 174 { 172 175 ASSERT( gf_isff( imm2int( op ) ), "invalid conversion" ); 173 176 if ( cf_glob_switches.isOn( SW_SYMMETRIC_FF ) ) … … 176 179 return gf_gf2ff( imm2int( op ) ); 177 180 } 178 else181 /*else*/ 179 182 return imm2int( op ); 180 183 }
Note: See TracChangeset
for help on using the changeset viewer.