Changeset 5dc4ea in git
- Timestamp:
- Sep 18, 1997, 11:58:26 AM (27 years ago)
- Branches:
- (u'spielwiese', 'fe61d9c35bf7c61f2b6cbf1b56e25e2f08d536cc')
- Children:
- 1a5daea04547872672e8d5c6d19ac391e34ca05e
- Parents:
- 741512c3f18910d2025325eadcbef56647da00d0
- Location:
- Singular
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
Singular/LIB/deform.lib
r741512c r5dc4ea 1 // $Id: deform.lib,v 1. 2 1997-04-28 19:27:15 obachmanExp $1 // $Id: deform.lib,v 1.3 1997-09-18 09:58:22 Singular Exp $ 2 2 //(BM/GMG, last modified 22.06.96) 3 3 /////////////////////////////////////////////////////////////////////////////// … … 42 42 ideal jetJ - defining the miniversal base space (in `na`) 43 43 ideal jetF - defining miniversal total space (in `na`) 44 NOTE: printlevel >=0: display dimT1,T2 and explain created objects (default)44 NOTE: printlevel >=0: display dimT1,T2 and miniversal equations (default) 45 45 printlevel >=1: show partial + final result during computation 46 46 printlevel >=2: show also memory and time usage … … 72 72 id = simplify(id,10); 73 73 int @rowR = size(id); 74 if( @rowR<=1 )75 {76 "// hypersurface, use proc deform from sing.lib";77 return();78 }74 //if( @rowR<=1 ) 75 //{ 76 // "// hypersurface, use proc deform from sing.lib"; 77 // return(); 78 //} 79 79 //------- change ordering if not correct -------------------------------------- 80 80 @t1=1; … … 221 221 } 222 222 //--------- end loop and final output --------------------------------------- 223 dbprint(p -1,"","// ___ Equations of miniversal base space___",jetJ,224 "","// ___ Equations of miniversal total space___",jetF);225 dbprint(p,"","// Result belongs to ring "+@na+".",226 "// Equations of total space of miniversal deformation are",227 "// given by jetF, equations of miniversal base space by jetJ.",223 dbprint(p,"","// ___ Equations of miniversal base space (jetJ) ___",jetJ, 224 "","// ___ Equations of miniversal total space (jetF) ___",jetF); 225 dbprint(p,"","// Equations of base space of miniversal deformation are given", 226 "// by the ideal jetJ, equations of miniversal total space by jetF.", 227 "// Both are defined in the ring "+@na+" created in 'miniversal'.", 228 228 "// Make "+@na+" the basering and list objects defined in "+@na+" by typing:", 229 " setring "+@na+"; show("+@na+");","listvar(ideal);");229 "// setring "+@na+"; show("+@na+"); listvar(ideal);"); 230 230 kill @On; 231 231 return(); -
Singular/LIB/invar.lib
r741512c r5dc4ea 1 // $Id: invar.lib,v 1. 2 1997-09-10 07:52:55Singular Exp $1 // $Id: invar.lib,v 1.3 1997-09-18 09:58:24 Singular Exp $ 2 2 /////////////////////////////////////////////////////// 3 3 // invar.lib 4 4 // algorithm for computing the ring of invariants under 5 // the action of the additive group 5 // the action of the additive group (C,+) 6 6 // written by Gerhard Pfister 7 7 ////////////////////////////////////////////////////// 8 8 9 LIBRARY: invar.lib PROCEDURE FOR COMPUTING INVARIANTS UNDER C+-ACTIONS9 LIBRARY: invar.lib PROCEDURE FOR COMPUTING INVARIANTS UNDER (C,+)-ACTIONS 10 10 11 11 invariantRing(matrix m,poly p,poly q,int choose) -
Singular/LIB/matrix.lib
r741512c r5dc4ea 1 // $Id: matrix.lib,v 1. 3 1997-08-12 14:01:08Singular Exp $1 // $Id: matrix.lib,v 1.4 1997-09-18 09:58:24 Singular Exp $ 2 2 // (GMG/BM, last modified 22.06.96) 3 3 /////////////////////////////////////////////////////////////////////////////// … … 12 12 is_complex(c); 1 if list c is a complex, 0 if not 13 13 outer(A,B); matrix, outer product of matrices A and B 14 power(A,n); matrix/intmat, n-th power of matrix/intmat A 14 15 skewmat(n[,id]); generic skew-symmetric nxn matrix [entries from id] 15 16 submat(A,r,c); submatrix of A with rows/cols specified by intvec r/c … … 265 266 //////////////////////////////////////////////////////////////////////////////// 266 267 268 proc power ( A, int n) 269 USAGE: power(A,n); A a square-matrix of type intmat or matrix, n=integer 270 RETURN: inmat resp. matrix, the n-th power of A 271 NOTE: for intamt and big n the result may be wrong because of int overflow 272 EXAMPLE: example power; shows an example 273 { 274 //---------------------------- type checking ---------------------------------- 275 if( typeof(A)!="matrix" and typeof(A)!="intmat" ) 276 { 277 "// no matrix or intmat!"; 278 return (A); 279 } 280 if( ncols(A) != nrows(A) ) 281 { 282 "// not a suare matrix!"; 283 return(); 284 } 285 //---------------------------- trivial cases ---------------------------------- 286 int ii; 287 if( n <= 0 ) 288 { 289 if( typeof(A)=="matrix" ) 290 { 291 return (unitmat(nrows(A))); 292 } 293 if( typeof(A)=="intmat" ) 294 { 295 intmat B[nrows(A)][nrows(A)]; 296 for( ii=1; ii<=nrows(A); ii++ ) 297 { 298 B[ii,ii] = 1; 299 } 300 return (B); 301 } 302 } 303 if( n == 1 ) { return (A); } 304 //---------------------------- sub procedure ---------------------------------- 305 proc matpow (A, int n) 306 { 307 def B = A*A; 308 int ii= 2; 309 int jj= 4; 310 while( jj <= n ) 311 { 312 B=B*B; 313 ii=jj; 314 jj=2*jj; 315 } 316 return(B,n-ii); 317 } 318 //----------------------------- main program ---------------------------------- 319 list L = matpow(A,n); 320 def B = L[1]; 321 ii = L[2]; 322 while( ii>=2 ) 323 { 324 L = matpow(A,ii); 325 B = B*L[1]; 326 ii= L[2]; 327 } 328 if( ii == 0) { return(B); } 329 if( ii == 1) { return(A*B); } 330 } 331 example 332 { "EXAMPLE:"; echo = 2; 333 intmat A[3][3]=1,2,3,4,5,6,7,8,9; 334 print(power(A,3));""; 335 ring r=0,(x,y,z),dp; 336 matrix B[4][4]=0,x,y,z,0,0,y,z,0,0,0,z,x,y,z,0; 337 print(power(B,3));""; 338 matrix C[3][3]=1,2,3,4,5,6,7,8,9; 339 power(C,50); 340 } 341 //////////////////////////////////////////////////////////////////////////////// 342 267 343 proc skewmat (int n, list #) 268 344 USAGE: skewmat(n[,id]); n integer, id ideal -
Singular/LIB/prim_dec.lib
r741512c r5dc4ea 1 // $Id: prim_dec.lib,v 1. 5 1997-08-12 17:14:45 Singular Exp $1 // $Id: prim_dec.lib,v 1.6 1997-09-18 09:58:25 Singular Exp $ 2 2 /////////////////////////////////////////////////////// 3 3 // pseudoprimdec.lib … … 7 7 ////////////////////////////////////////////////////// 8 8 9 LIBRARY: prim_dec.lib: PROCEDURE FOR PRIMARY DECOMPOSITION ( II)9 LIBRARY: prim_dec.lib: PROCEDURE FOR PRIMARY DECOMPOSITION (S/Y) 10 10 11 11 min_ass_prim_charsets (ideal I, int choose) -
Singular/LIB/primdec.lib
r741512c r5dc4ea 1 // $Id: primdec.lib,v 1. 4 1997-09-10 10:55:39Singular Exp $1 // $Id: primdec.lib,v 1.5 1997-09-18 09:58:26 Singular Exp $ 2 2 /////////////////////////////////////////////////////// 3 3 // primdec.lib … … 7 7 ////////////////////////////////////////////////////// 8 8 9 LIBRARY: primdec.lib: PROCEDURE FOR PRIMARY DECOMPOSITION ( I)9 LIBRARY: primdec.lib: PROCEDURE FOR PRIMARY DECOMPOSITION (G/T/Z) 10 10 11 11 minAssPrimes (ideal I, list choose) -
Singular/longalg.cc
r741512c r5dc4ea 2 2 * Computer Algebra System SINGULAR * 3 3 ****************************************/ 4 /* $Id: longalg.cc,v 1.1 1 1997-09-16 13:45:32Singular Exp $ */4 /* $Id: longalg.cc,v 1.12 1997-09-18 09:58:20 Singular Exp $ */ 5 5 /* 6 6 * ABSTRACT: algebraic numbers … … 54 54 /* procedure variables */ 55 55 static numberfunc 56 nacMult, nacSub, nacAdd, nacDiv, nac Gcd, nacLcm;56 nacMult, nacSub, nacAdd, nacDiv, nacIntDiv, nacGcd, nacLcm; 57 57 #ifdef LDEBUG 58 58 static void (*nacDBDelete)(number *a,char *f,int l); … … 79 79 static int napExpi(int i, alg a, alg b); 80 80 81 static number nadGcd( number a, number b) { return nacInit(1); } 81 82 /*2 82 83 * sets the appropriate operators … … 114 115 nacMult = nlMult; 115 116 nacDiv = nlDiv; 117 nacIntDiv = nlIntDiv; 116 118 nacInvers = nlInvers; 117 119 nacNormalize = nlNormalize; … … 145 147 nacMult = npMult; 146 148 nacDiv = npDiv; 149 nacIntDiv = npDiv; 147 150 nacInvers = npInvers; 148 151 nacNormalize = nDummy2; … … 154 157 nacIsOne = npIsOne; 155 158 nacIsMOne = npIsMOne; 156 nacGcd = n dGcd;157 nacLcm = n dGcd;159 nacGcd = nadGcd; 160 nacLcm = nadGcd; 158 161 } 159 162 } … … 167 170 168 171 /*============= procedure for polynomials: napXXXX =======================*/ 172 173 #define napSetCoeff(p,n) {nacDelete(&((p)->ko));(p)->ko=n;} 174 #define napIter(A) A=(A)->ne 175 169 176 170 177 /*3 … … 2016 2023 } 2017 2024 #endif 2025 /* remove common factors from z and n */ 2026 x=p->z; 2027 y=p->n; 2028 if(!nacGreaterZero(napGetCoeff(y))) 2029 { 2030 x=napNeg(x); 2031 y=napNeg(y); 2032 } 2033 number g=nacCopy(napGetCoeff(x)); 2034 napIter(x); 2035 while (x!=NULL) 2036 { 2037 number d=nacGcd(g,napGetCoeff(x)); 2038 if(nacIsOne(d)) 2039 { 2040 nacDelete(&g); 2041 nacDelete(&d); 2042 return; 2043 } 2044 nacDelete(&g); 2045 g = d; 2046 napIter(x); 2047 } 2048 while (y!=NULL) 2049 { 2050 number d=nacGcd(g,napGetCoeff(y)); 2051 if(nacIsOne(d)) 2052 { 2053 nacDelete(&g); 2054 nacDelete(&d); 2055 return; 2056 } 2057 nacDelete(&g); 2058 g = d; 2059 napIter(y); 2060 } 2061 x=p->z; 2062 y=p->n; 2063 while (x!=NULL) 2064 { 2065 number d = nacIntDiv(napGetCoeff(x),g); 2066 napSetCoeff(x,d); 2067 napIter(x); 2068 } 2069 while (y!=NULL) 2070 { 2071 number d = nacIntDiv(napGetCoeff(y),g); 2072 napSetCoeff(y,d); 2073 napIter(y); 2074 } 2075 nacDelete(&g); 2018 2076 } 2019 2077
Note: See TracChangeset
for help on using the changeset viewer.