Changeset c06ecc in git
- Timestamp:
- Oct 15, 2014, 6:31:01 PM (10 years ago)
- Branches:
- (u'spielwiese', 'fe61d9c35bf7c61f2b6cbf1b56e25e2f08d536cc')
- Children:
- 2ce9848f1ee079e74077e0d40f8e3680757066cf2f4dd5a87dcf29d41537f40a475736e40e368990
- Parents:
- 18f7ec4086c8cf26381fcff05f5d5583122db84d9816f392b7b239b26d4d6f3758f36db684ebdb07
- Files:
-
- 13 edited
Legend:
- Unmodified
- Added
- Removed
-
Singular/LIB/linalg.lib
r9816f3 rc06ecc 1251 1251 static proc rowcolswap(matrix M,int i,int j) 1252 1252 { 1253 if(system("with","eigenval")) 1254 { 1255 return(system("rowcolswap",M,i,j)); 1256 } 1257 //-------------------------------------------- 1253 1258 if(i==j) 1254 1259 { … … 1274 1279 static proc rowelim(matrix M,int i,int j,int k) 1275 1280 { 1281 if(system("with","eigenval")) 1282 { 1283 return(system("rowelim",M,i,j,k)); 1284 } 1285 // ----------------------- 1276 1286 if(jet(M[i,k],0)==0||jet(M[j,k],0)==0) 1277 1287 { … … 1491 1501 RETURN: list l: 1492 1502 l[1] an ideal, the generators of a; sorted and with multiple entries displayed only once@* 1493 l[2] an dintvec, l[2][i] provides the multiplicity of l[1][i]1503 l[2] an intvec, l[2][i] provides the multiplicity of l[1][i] 1494 1504 EXAMPLE: example spnf; shows examples 1495 1505 " -
Singular/LIB/primdec.lib
r18f7ec rc06ecc 8665 8665 helpprim=@lh[2]; 8666 8666 lres0[1]=primary[2*@k-1]; 8667 attrib(lres0[1],"isSB",1); 8667 8668 ser1=psi(helpprim); 8668 8669 lres0[2]=psi1(ser1); -
Singular/dyn_modules/syzextra/syzextra.cc
r9816f3 rc06ecc 97 97 //return -( compare (c, qsorts) ) 98 98 99 #ifndef NDEBUG99 #ifndef SING_NDEBUG 100 100 const int __DEBUG__ = 0; 101 101 if( __DEBUG__ ) … … 126 126 assume( iDegDiff == 0 ); 127 127 128 #ifndef NDEBUG128 #ifndef SING_NDEBUG 129 129 if( __DEBUG__ ) 130 130 { … … 170 170 assume( p_GetComp(b, r) == 0 ); 171 171 172 #ifndef NDEBUG172 #ifndef SING_NDEBUG 173 173 const int __DEBUG__ = 0; 174 174 if( __DEBUG__ ) … … 492 492 if( (p_GetExp(p, var, r) != 0) && (p_GetExp(t, var, r) != 0) ) 493 493 { 494 #ifndef NDEBUG494 #ifndef SING_NDEBUG 495 495 if( __DEBUG__ | 0) 496 496 { … … 512 512 coprime = ( syzChecker.IsDivisible(ss) ); 513 513 514 #ifndef NDEBUG514 #ifndef SING_NDEBUG 515 515 if( __DEBUG__ && !coprime) 516 516 { … … 525 525 } 526 526 527 #ifndef NDEBUG527 #ifndef SING_NDEBUG 528 528 if( __DEBUG__ && coprime ) 529 529 PrintS("CReducerFinder::PreProcessTerm, the following 't' is 'co-prime' with all of leading terms! \n"); … … 546 546 const ring r = m_rBaseRing; 547 547 548 #ifndef NDEBUG548 #ifndef SING_NDEBUG 549 549 if( __DEBUG__ | 0) 550 550 { … … 563 563 assume( 0 <= k && k <= 3 ); 564 564 565 #ifndef NDEBUG565 #ifndef SING_NDEBUG 566 566 pp[k]++; 567 567 #endif … … 569 569 if( k ) 570 570 { 571 #ifndef NDEBUG571 #ifndef SING_NDEBUG 572 572 if( __DEBUG__) 573 573 { … … 584 584 } 585 585 586 #ifndef NDEBUG586 #ifndef SING_NDEBUG 587 587 if( !__TREEOUTPUT__ ) 588 588 if( TEST_OPT_PROT | 1) … … 590 590 #endif 591 591 592 #ifndef NDEBUG592 #ifndef SING_NDEBUG 593 593 if( !__TREEOUTPUT__ ) 594 594 if( __DEBUG__ | 0) … … 971 971 972 972 assume( IDELEMS(L) == IDELEMS(T) ); 973 #ifndef NDEBUG973 #ifndef SING_NDEBUG 974 974 int t, r; 975 975 #endif … … 982 982 if( m_syzLeads == NULL ) 983 983 { 984 #ifndef NDEBUG984 #ifndef SING_NDEBUG 985 985 if( !__TREEOUTPUT__ ) 986 986 if( TEST_OPT_PROT | 1) … … 991 991 #endif 992 992 ComputeLeadingSyzygyTerms( __LEAD2SYZ__ && !__IGNORETAILS__ ); // 2 terms OR 1 term! 993 #ifndef NDEBUG993 #ifndef SING_NDEBUG 994 994 if( !__TREEOUTPUT__ ) 995 995 if( TEST_OPT_PROT | 1) … … 1023 1023 if( T != NULL ) 1024 1024 { 1025 #ifndef NDEBUG1025 #ifndef SING_NDEBUG 1026 1026 if( !__TREEOUTPUT__ ) 1027 1027 if( TEST_OPT_PROT | 1 ) … … 1033 1033 1034 1034 SetUpTailTerms(); 1035 #ifndef NDEBUG1035 #ifndef SING_NDEBUG 1036 1036 if( !__TREEOUTPUT__ ) 1037 1037 if( TEST_OPT_PROT | 1) … … 1044 1044 } 1045 1045 1046 #ifndef NDEBUG1046 #ifndef SING_NDEBUG 1047 1047 if( !__TREEOUTPUT__ ) 1048 1048 if( TEST_OPT_PROT | 1) … … 1083 1083 } 1084 1084 1085 #ifndef NDEBUG1085 #ifndef SING_NDEBUG 1086 1086 if( !__TREEOUTPUT__ ) 1087 1087 if( TEST_OPT_PROT | 1) … … 1128 1128 m_LS = m_syzLeads; 1129 1129 m_checker.Initialize(m_syzLeads); 1130 #ifndef NDEBUG1130 #ifndef SING_NDEBUG 1131 1131 if( __DEBUG__ ) 1132 1132 { … … 1543 1543 1544 1544 SchreyerSyzygyComputationFlags::SchreyerSyzygyComputationFlags(idhdl rootRingHdl): 1545 #ifndef NDEBUG1545 #ifndef SING_NDEBUG 1546 1546 __DEBUG__( atGetInt(rootRingHdl,"DEBUG", 0) ), 1547 1547 #else … … 1557 1557 m_rBaseRing( rootRingHdl->data.uring ) 1558 1558 { 1559 #ifndef NDEBUG1559 #ifndef SING_NDEBUG 1560 1560 if( __DEBUG__ ) 1561 1561 { … … 1792 1792 if( Current().DivisibilityCheck(m_product, m_not_sev, m_rBaseRing) ) 1793 1793 { 1794 #ifndef NDEBUG1794 #ifndef SING_NDEBUG 1795 1795 if( __DEBUG__ ) 1796 1796 { … … 1861 1861 1862 1862 1863 #ifndef NDEBUG1863 #ifndef SING_NDEBUG 1864 1864 void CReducerFinder::DebugPrint() const 1865 1865 { … … 1967 1967 if( Current().DivisibilityCheck(m_multiplier, m_term, m_not_sev, m_rBaseRing) ) 1968 1968 { 1969 #ifndef NDEBUG1969 #ifndef SING_NDEBUG 1970 1970 if( __DEBUG__ ) 1971 1971 { … … 2052 2052 if (p_ExpVectorEqual(syzterm, q, r)) 2053 2053 { 2054 #ifndef NDEBUG2054 #ifndef SING_NDEBUG 2055 2055 if( __DEBUG__ ) 2056 2056 { … … 2065 2065 if( to_check && syz_checker.IsDivisible(q) ) 2066 2066 { 2067 #ifndef NDEBUG2067 #ifndef SING_NDEBUG 2068 2068 if( __DEBUG__ ) 2069 2069 { … … 2229 2229 if (p_ExpVectorEqual(syzterm, q, r)) 2230 2230 { 2231 #ifndef NDEBUG2231 #ifndef SING_NDEBUG 2232 2232 if( __DEBUG__ ) 2233 2233 { … … 2242 2242 if( to_check && syz_checker.IsDivisible(q) ) 2243 2243 { 2244 #ifndef NDEBUG2244 #ifndef SING_NDEBUG 2245 2245 if( __DEBUG__ ) 2246 2246 { -
Singular/dyn_modules/syzextra/syzextra.h
r9816f3 rc06ecc 178 178 poly FindReducer(const poly multiplier, const poly monom, const poly syzterm, const CReducerFinder& checker) const; 179 179 180 #ifndef NDEBUG180 #ifndef SING_NDEBUG 181 181 void DebugPrint() const; 182 182 #endif -
Singular/eigenval_ip.cc
r9816f3 rc06ecc 60 60 if(h&&h->Typ()==MATRIX_CMD) 61 61 { 62 matrix M=(matrix)h-> Data();62 matrix M=(matrix)h->CopyD(); 63 63 h=h->next; 64 64 if(h&&h->Typ()==INT_CMD) … … 74 74 int k=(int)(long)h->Data(); 75 75 res->rtyp=MATRIX_CMD; 76 res->data=(void *)evRowElim( mp_Copy(M, currRing),i,j,k);76 res->data=(void *)evRowElim(M,i,j,k); 77 77 return FALSE; 78 78 } … … 148 148 } 149 149 150 M=evHessenberg( (matrix)id_Jet((ideal)M,0,currRing));151 152 int n=MAT ROWS(M);150 M=evHessenberg(M); 151 152 int n=MATCOLS(M); 153 153 ideal e=idInit(n,1); 154 154 intvec *m=new intvec(n); … … 181 181 182 182 intvec *m0; 183 ideal e0=singclap_factorize(mp_DetBareiss(M ,currRing),&m0,2, currRing);183 ideal e0=singclap_factorize(mp_DetBareiss(M0,currRing),&m0,2, currRing); 184 184 if (e0==NULL) 185 185 { … … 199 199 pNext(pNext(e0->m[i]))==NULL) 200 200 { 201 number e1=nInpNeg(nCopy(pGetCoeff(e0->m[i]))); 201 number e1=nCopy(pGetCoeff(e0->m[i])); 202 e1=nInpNeg(e1); 202 203 if(pGetExp(pNext(e0->m[i]),1)==0) 203 204 e->m[k]=pNSet(nDiv(pGetCoeff(pNext(e0->m[i])),e1)); … … 293 294 if(h&&h->Typ()==MATRIX_CMD) 294 295 { 295 matrix M=(matrix)h-> Data();296 matrix M=(matrix)h->CopyD(); 296 297 res->rtyp=LIST_CMD; 297 res->data=(void *)evEigenvals( mp_Copy(M, currRing));298 res->data=(void *)evEigenvals(M); 298 299 return FALSE; 299 300 } -
Singular/extra.cc
r9816f3 rc06ecc 1099 1099 { 1100 1100 return evEigenvals(res,h); 1101 } 1102 else 1103 #endif 1104 /*==================== rowelim ==================================*/ 1105 #ifdef HAVE_EIGENVAL 1106 if(strcmp(sys_cmd,"rowelim")==0) 1107 { 1108 return evRowElim(res,h); 1109 } 1110 else 1111 #endif 1112 /*==================== rowcolswap ==================================*/ 1113 #ifdef HAVE_EIGENVAL 1114 if(strcmp(sys_cmd,"rowcolswap")==0) 1115 { 1116 return evSwap(res,h); 1101 1117 } 1102 1118 else -
Singular/gms.cc
r9816f3 rc06ecc 46 46 pSetm(m); 47 47 for(int i=0;i<MATROWS(B);i++) 48 48 { 49 49 poly m0=pDiff(m,i+2); 50 50 if(MATELEM(B0,i+1,j+1)!=NULL) … … 68 68 int i=pGetExp(p->m[k],1); 69 69 do 70 70 { 71 71 poly p0=p->m[k]; 72 72 pIter(p->m[k]); … … 106 106 if(h&&h->Typ()==IDEAL_CMD) 107 107 { 108 ideal p=(ideal)h-> Data();108 ideal p=(ideal)h->CopyD(); 109 109 h=h->next; 110 110 if(h&&h->Typ()==IDEAL_CMD) … … 124 124 int K=(int)(long)h->Data(); 125 125 res->rtyp=LIST_CMD; 126 res->data=(void *)gmsNF( idCopy(p),g,B,D,K);126 res->data=(void *)gmsNF(p,g,B,D,K); 127 127 return FALSE; 128 129 128 } 129 } 130 130 } 131 131 } -
Tst/Short/bug_primdec.res.gz.uu
r18f7ec rc06ecc 1 1 begin 644 bug_primdec.res.gz 2 M'XL("(F'/SH``V)U9U]P<FEM9&5C+G)E<P!-D$%+PT`0A>_Y%8_B(3&)-+NQ 3 MUI8L*%X*XJ7>)"EI$V0AU>WN"MG]]4Y)[7I[,]][,\-LWU\V;P`*@=?-,V9* 4 MRV/7'^X&N9^MH^V%,@$MOSX!C0J<S><\B\?,93[).A5L7$!]#PY09/,L+0(J 5 M_]#IC,J4!70O(+N^'2`)J8;=GAH:[W+/D[,8<^=37R9-&2(+@4$:"Z4IH7O5 6 MZO[)F%@FP?)`"_4Z^BCJ543ECD0U3HK5E6,I365T(YMZO*X\S]TUOKS\PQH[ 7 9_0*D=L:V]L?$Q;\]CP(WT2^@-57&1@$````` 2 M'XL("(.8/E0``V)U9U]P<FEM9&5C+G)E<P"E4VUKVS`0_IY?<81!_1;/DIPF 3 M:XAA8V,$MC%H/VTD18U%:_!;)=FU7?;?=XI3:X-M7R8POM,]]]QQS^GZYOWN 4 M"P"0!#[MWL&\EEF1BF.89W?SS>SZ'*4)R*R\!Y"P!4:CB`5.%_3!X`9I;6$L 5 M@;K*>X`:80/UB0W%+Z%'$XI]:D/+!+)4\!PR#-4'ZCT>D+Y?#,PU1K?H!W^( 6 MW4-L4RX3R#.EH9:8(47-I7BKE).Y%K+"@G(S^T[V5S-T;]'8=J-%]]N>^LA* 7 ML4<ZWK']=F"+?DI?)S#9;T)X_9_GA8M$A@NTP.;U`]=0E0**2@JXR!24%2C- 8 MRY3+%.ZXRM0%/'%9FLEC]-Y@^1.?FB0D!-4K+0IG+C&M*N8!B9=T':W8Y<K. 9 M@E`SB^H(9W$_9Z71XD/'BSH7CCOA6`C/DQ.'8,Y)=XG?%IQ5T+;N6?F@^4U[ 10 M<CG"BY$;T="V!^JWK<\L:#V"1KEWAG+!O+9=$-=K$$P#ZG7>X#O47%+7ZT;3 11 M)U@5?^8&]Z.9;KUA=+$M;S`44RD:C:5.:R*%:G*-Y;`[W)./-]_`V=GY4!K" 12 MC\EA5GD:G]3*RJ,47`DX\CR'5-3ZX6J"+,-QMD;2KW^>+\#S:9)"-[)T_J8" 13 MN!L$V3YPQ__!:9M?_=(OSG>R<6M/+UHK/;YF0.L6]TLWRB&6@$4)O)K]!!$' 14 &7*T(!``` 8 15 ` 9 16 end -
Tst/Short/bug_primdec.tst
r18f7ec rc06ecc 6 6 list pr= prepareAss(i); 7 7 pr; 8 9 //////////////////////////////////////////////////////////////// 10 // test that one more 'is no standard basis' warning is gone away 11 system("random",1452807367); 12 proc primdecMinpolyExample() 13 { 14 ring rng = (7,vv),(x,y,z,u),dp; 15 minpoly = vv^2+vv+3; 16 ideal I = (-3*vv-1)*u^2+2,2*x*z+(2*vv-2)*x+(2*vv+1),(vv+2)*x^2*u+(2*vv+1)*z^2*u+(vv)*z*u^2; 17 list result = minAssGTZ (I); 18 } 19 20 // increase call depth: 21 proc testPrimdecMinpolyExample() { return( primdecMinpolyExample() ); } 22 testPrimdecMinpolyExample(); 23 24 8 25 LIB "tst.lib"; tst_status(1); 9 26 $ -
kernel/GBEngine/tgbgauss.cc
r9816f3 rc06ecc 430 430 if(!(mat->is_zero_entry(i,col))) 431 431 { 432 number c1=nInpNeg(nCopy(mat->get(i,col))); 432 number c1=nCopy(mat->get(i,col)); 433 c1=nInpNeg(c1); 433 434 number c2=mat->get(row,col); 434 435 number n1=c1; -
kernel/linear_algebra/eigenval.cc
r9816f3 rc06ecc 14 14 15 15 #include <kernel/structs.h> 16 //#include "ipid.h"17 16 #include <misc/intvec.h> 18 17 #include <coeffs/numbers.h> 19 18 #include <kernel/polys.h> 20 19 #include <kernel/ideals.h> 21 //#include "lists.h"22 20 #include <polys/matpol.h> 23 21 #include <polys/clapsing.h> … … 51 49 if(MATELEM(M,i,k)==NULL||MATELEM(M,j,k)==NULL) 52 50 return(M); 51 poly p1=pp_Jet(MATELEM(M,i,k),0,currRing); 52 poly p2=pp_Jet(MATELEM(M,j,k),0,currRing); 53 if ((p1==NULL)||(p2==NULL)) return (M); 53 54 54 poly p=pNSet(nDiv(pGetCoeff( MATELEM(M,i,k)),pGetCoeff(MATELEM(M,j,k))));55 poly p=pNSet(nDiv(pGetCoeff(p1),pGetCoeff(p2))); 55 56 pNormalize(p); 56 57 … … 67 68 68 69 pDelete(&p); 70 pDelete(&p1); 71 pDelete(&p2); 69 72 70 73 return(M); … … 103 106 for(int k=1,j=2;k<n-1;k++,j=k+1) 104 107 { 105 while(j<=n&&MATELEM(M,j,k)==NULL) 108 while((j<=n) 109 &&((MATELEM(M,j,k)==NULL) 110 || (p_Totaldegree(MATELEM(M,j,k),currRing)!=0))) 106 111 j++; 107 112 -
kernel/mod2.h
r9816f3 rc06ecc 47 47 48 48 /* eigenvalues */ 49 /*#define HAVE_EIGENVAL 1*/ 49 #define HAVE_EIGENVAL 1 50 50 51 51 /* Gauss-Manin system */ 52 /*#define HAVE_GMS 1*/ 52 #define HAVE_GMS 1 53 53 54 54 /* include simpleipc/semaphore code, link against librt/libpthread */
Note: See TracChangeset
for help on using the changeset viewer.