Changeset 35ceb0 in git
- Timestamp:
- May 4, 2005, 11:31:39 AM (18 years ago)
- Branches:
- (u'spielwiese', '91fdef05f09f54b8d58d92a472e9c4a43aa4656f')
- Children:
- 9091d3c67d9cb6f17d3aec61f7c39d46db565862
- Parents:
- 9a0cc7d25e77bedcb338c2ab32de3f3eefda109f
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
Singular/LIB/presolve.lib
r9a0cc7 r35ceb0 1 1 //last change: 13.02.2001 (Eric Westenberger) 2 2 /////////////////////////////////////////////////////////////////////////////// 3 version="$Id: presolve.lib,v 1.2 2 2005-05-02 11:53:42Singular Exp $";3 version="$Id: presolve.lib,v 1.23 2005-05-04 09:31:39 Singular Exp $"; 4 4 category="Symbolic-numerical solving"; 5 5 info=" … … 19 19 tolessvars(id[,]); maps id to new basering having only vars occuring in id 20 20 solvelinearpart(id); reduced std-basis of linear part of id 21 sortandmap(id 21 sortandmap(id[..]); map to new basering with vars sorted w.r.t. complexity 22 22 sortvars(id[n1,p1..]); sort vars w.r.t. complexity in id [different blocks] 23 23 valvars(id[..]); valuation of vars w.r.t. to their complexity in id … … 34 34 LIB "ring.lib"; 35 35 LIB "elim.lib"; 36 /////////////////////////////////////////////////////////////////////////////// 37 proc shortid (id,int n,list #) 38 "USAGE: shortid(id,n[,e]); id= ideal/module, n,e=integers 39 RETURN: - if called with two arguments or e=0: 40 @* same type as id, containing generators of id having <= n terms. 41 @* - if called with three arguments and e!=0: 42 @* a list L: 43 @* L[1]: same type as id, containing generators of id having <= n terms. 44 @* L[2]: number of corresponding generator of id 45 NOTE: May be used to compute partial standard basis in case id is to hard 46 EXAMPLE: example shortid; shows an example 47 " 48 { 49 intvec v; 50 int ii; 51 for(ii=1; ii<=ncols(id); ii++) 52 { 53 if (size(id[ii]) <=n and id[ii]!=0 ) 54 { 55 v=v,ii; 56 } 57 if (size(id[ii]) > n ) 58 { 59 id[ii]=0; 60 } 61 } 62 if( size(v)>1 ) 63 { 64 v = v[2..size(v)]; 65 } 66 id = simplify(id,2); 67 list L = id,v; 68 if ( size(#)==0 ) 69 { 70 return(id); 71 } 72 if ( size(#)!=0 ) 73 { 74 if(#[1]==0) 75 { 76 return(id); 77 } 78 if(#[1]!=0) 79 { 80 return(L); 81 } 82 } 83 } 84 example 85 { "EXAMPLE:"; echo = 2; 86 ring s=0,(x,y,z,w),dp; 87 ideal i = (x3+y2+yw2)^2,(xz+z2)^2,xyz-w2-xzw; 88 shortid(i,3); 89 } 36 90 /////////////////////////////////////////////////////////////////////////////// 37 91 … … 148 202 } 149 203 } 150 lin = simplify(lin, 2);204 lin = simplify(lin,3); 151 205 attrib(lin,"isSB",1); 152 206 ideal eva = lead(lin); … … 293 347 kin = simplify(phi(kin),2); 294 348 l = size(kin); 295 ii=ii+1;349 // ii=ii+1; 296 350 break; 297 351 } … … 321 375 } 322 376 } 323 L = lin, eva, sub, neva, phi; 377 map psi=P,phi; 378 ideal phi1=maxideal(1); 379 for(ii=1;ii<=size(eva);ii++){phi1=psi(phi1);} 380 L = lin, eva, sub, neva, phi1; 324 381 return(L); 325 382 } … … 1164 1221 /////////////////////////////////////////////////////////////////////////////// 1165 1222 proc idealSplit(ideal I,list #) 1166 "USAGE: idealSplit(id,timeF,timeS); id ideal and optio onal1223 "USAGE: idealSplit(id,timeF,timeS); id ideal and optional 1167 1224 timeF ,timeS integers to bound the time which can be used 1168 1225 for factorization resp. standard basis computation
Note: See TracChangeset
for help on using the changeset viewer.