Changeset b429551 in git
- Timestamp:
- Jan 22, 2008, 10:51:37 AM (15 years ago)
- Branches:
- (u'spielwiese', '8d54773d6c9e2f1d2593a28bc68b7eeab54ed529')
- Children:
- f24a7f4cb925cec508572ae72f9bf06624119a14
- Parents:
- 35cfa3461f55f0fe3760bcefda25c627641368c7
- Location:
- libfac
- Files:
-
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
libfac/charset/alg_factor.cc
r35cfa3 rb429551 3 3 // emacs edit mode for this file is -*- C++ -*- 4 4 //////////////////////////////////////////////////////////// 5 static char * rcsid = "$Id: alg_factor.cc,v 1.1 7 2007-05-15 14:46:48Singular Exp $";5 static char * rcsid = "$Id: alg_factor.cc,v 1.18 2008-01-22 09:51:36 Singular Exp $"; 6 6 //////////////////////////////////////////////////////////// 7 7 // FACTORY - Includes … … 754 754 Fgcd= pp(Fgcd); Ggcd= pp(Ggcd); 755 755 DEBDECLEVEL(CERR,"newfactoras"); 756 return myUnion(newfactoras(Fgcd,as,success) , newfactoras(Ggcd,as,success));756 return UnionCFFL(newfactoras(Fgcd,as,success) , newfactoras(Ggcd,as,success)); 757 757 } 758 758 if ( getCharacteristic() > 0 ){ … … 823 823 output=newfactoras(i.getItem().factor(),as, success); 824 824 for ( CFFListIterator j=output; j.hasItem(); j++) 825 Output = myappend(Output,CFFactor(j.getItem().factor(),j.getItem().exp()*i.getItem().exp()));825 Output = appendCFFL(Output,CFFactor(j.getItem().factor(),j.getItem().exp()*i.getItem().exp())); 826 826 } 827 827 return Output; … … 830 830 /* 831 831 $Log: not supported by cvs2svn $ 832 Revision 1.17 2007/05/15 14:46:48 Singular 833 *hannes: factorize in Zp(a)[x...] 834 832 835 Revision 1.16 2006/05/16 14:46:48 Singular 833 836 *hannes: gcc 4.1 fixes -
libfac/charset/algfactor.cc
r35cfa3 rb429551 3 3 // emacs edit mode for this file is -*- C++ -*- 4 4 //////////////////////////////////////////////////////////// 5 static char * rcsid = "$Id: algfactor.cc,v 1. 8 2006-06-19 13:37:46Singular Exp $";5 static char * rcsid = "$Id: algfactor.cc,v 1.9 2008-01-22 09:51:37 Singular Exp $"; 6 6 //////////////////////////////////////////////////////////// 7 7 // FACTORY - Includes … … 429 429 success= min(success,csuccess); 430 430 for ( CFFListIterator j=CERR; j.hasItem(); j++) 431 Output = myappend(Output,CFFactor(j.getItem().factor(),j.getItem().exp()*i.getItem().exp()));431 Output = appendCFFL(Output,CFFactor(j.getItem().factor(),j.getItem().exp()*i.getItem().exp())); 432 432 } 433 433 return Output; … … 450 450 /* 451 451 $Log: not supported by cvs2svn $ 452 Revision 1.8 2006/06/19 13:37:46 Singular 453 *hannes: more CS renamed 454 452 455 Revision 1.7 2006/05/16 14:46:48 Singular 453 456 *hannes: gcc 4.1 fixes -
libfac/factor/Factor.cc
r35cfa3 rb429551 1 1 /* Copyright 1996 Michael Messollen. All rights reserved. */ 2 2 /////////////////////////////////////////////////////////////////////////////// 3 static char * rcsid = "$Id: Factor.cc,v 1.3 8 2008-01-07 13:34:56Singular Exp $ ";3 static char * rcsid = "$Id: Factor.cc,v 1.39 2008-01-22 09:51:37 Singular Exp $ "; 4 4 static char * errmsg = "\nYou found a bug!\nPlease inform (Michael Messollen) michael@math.uni-sb.de \nPlease include above information and your input (the ideal/polynomial and characteristic) in your bug-report.\nThank you."; 5 5 /////////////////////////////////////////////////////////////////////////////// … … 312 312 // the multiplicity of the save_denumerator <-> lc 313 313 // the following will do what we want 314 Returnlist= myUnion( CFFList(CFFactor(1/a,1)),Returnlist) ;314 Returnlist= UnionCFFL( CFFList(CFFactor(1/a,1)),Returnlist) ; 315 315 else 316 316 { … … 719 719 Outputlist_b = Factorized(ffuni,alpha); 720 720 DEBOUTLN(CERR, "Outputlist_b = ", Outputlist_b); 721 Outputlist = myUnion(Outputlist_a, Outputlist_b);721 Outputlist = UnionCFFL(Outputlist_a, Outputlist_b); 722 722 // have to back-swapvar the factors.... 723 723 for ( CFFListIterator i=Outputlist; i.hasItem(); i++ ){ … … 928 928 { 929 929 TIMING_START(sqrfree_time); 930 SqrFreeList = InternalSqrFree(F) ; // first sqrfree the polynomial 931 // don't use sqrFree(F), factory's internal sqrFree for multiv. 932 // Polynomials; it's wrong!! Ex.: char=p f= x^p*(y+1); 930 SqrFreeList = sqrFree(F,0,false) ; // first sqrfree the polynomial 931 // Ex.: char=p f= x^p*(y+1); 933 932 // InternalSqrFree(f)= ( y+1, (x)^p ), sqrFree(f)= ( y+1 ) . 934 933 TIMING_END(sqrfree_time); … … 941 940 else 942 941 SqrFreeList.append(CFFactor(F,1)); 943 DEBOUTLN(CERR, " InternalSqrFreeList= ", SqrFreeList);942 DEBOUTLN(CERR, "SqrFreeList= ", SqrFreeList); 944 943 for ( i=SqrFreeList; i.hasItem(); i++ ) 945 944 { … … 977 976 for ( j=Intermediatelist; j.hasItem(); j++ ) 978 977 //Normally j.getItem().exp() should be 1 979 Outputlist= myappend( Outputlist, CFFactor(m(j.getItem().factor()),exp*j.getItem().exp()));978 Outputlist= appendCFFL( Outputlist, CFFactor(m(j.getItem().factor()),exp*j.getItem().exp())); 980 979 } 981 980 } … … 1174 1173 { 1175 1174 CFList as(minpoly); 1176 CFFList sqF=sqrFree(F ); // sqrFreeZ1175 CFFList sqF=sqrFree(F,0,false); // sqrFreeZ 1177 1176 CFFList G,H; 1178 1177 CanonicalForm fac; … … 1228 1227 { 1229 1228 TIMING_START(sqrfree_time); 1230 SqrFreeList = InternalSqrFree(F, minpoly) ; // first sqrfree the polynomial 1231 // don't use sqrFree(F), factory's internal sqrFree for multiv. 1232 // Polynomials; it's wrong!! Ex.: char=p f= x^p*(y+1); 1229 SqrFreeList = sqrFree(F, minpoly) ; // first sqrfree the polynomial 1230 // Ex.: char=p f= x^p*(y+1); 1233 1231 // InternalSqrFree(f)= ( y+1, (x)^p ), sqrFree(f)= ( y+1 ) . 1234 1232 TIMING_END(sqrfree_time); … … 1241 1239 else 1242 1240 SqrFreeList.append(CFFactor(F,1)); 1243 DEBOUTLN(CERR, " InternalSqrFreeList= ", SqrFreeList);1241 DEBOUTLN(CERR, "SqrFreeList= ", SqrFreeList); 1244 1242 for ( i=SqrFreeList; i.hasItem(); i++ ) 1245 1243 { … … 1281 1279 for ( j=Intermediatelist; j.hasItem(); j++ ) 1282 1280 //Normally j.getItem().exp() should be 1 1283 Outputlist= myappend( Outputlist, CFFactor(m(j.getItem().factor()),exp*j.getItem().exp()));1281 Outputlist= appendCFFL( Outputlist, CFFactor(m(j.getItem().factor()),exp*j.getItem().exp())); 1284 1282 } 1285 1283 } … … 1331 1329 /* 1332 1330 $Log: not supported by cvs2svn $ 1331 Revision 1.38 2008/01/07 13:34:56 Singular 1332 *hannes: omse optiomzations(isOne) 1333 1333 1334 Revision 1.37 2007/10/25 14:45:41 Singular 1334 1335 *hannes: homgfactor for alg.ext of Q -
libfac/factor/MVMultiHensel.cc
r35cfa3 rb429551 2 2 /////////////////////////////////////////////////////////////////////////////// 3 3 // emacs edit mode for this file is -*- C++ -*- 4 // static char * rcsid = "$Id: MVMultiHensel.cc,v 1.1 4 2007-06-14 14:16:35Singular Exp $";4 // static char * rcsid = "$Id: MVMultiHensel.cc,v 1.15 2008-01-22 09:51:37 Singular Exp $"; 5 5 /////////////////////////////////////////////////////////////////////////////// 6 6 // FACTORY - Includes … … 334 334 { 335 335 CanonicalForm V,Fk=F,Gk=G,Rk,W,D,S; 336 int levelU=level(U), degU= subvardegree(U,levelU); // degree(U,{x_1,..,x_(level(U)-1)})336 int levelU=level(U), degU=totaldegree(U,1,levelU); // degree(U,{x_1,..,x_(level(U)-1)}) 337 337 DiophantForm Retvalue; 338 338 RememberArray A(degree(F,levelU)+degree(G,levelU)+1); … … 520 520 /* 521 521 $Log: not supported by cvs2svn $ 522 Revision 1.14 2007/06/14 14:16:35 Singular 523 *hannes: Factorize2 etc. 524 522 525 Revision 1.13 2007/05/25 16:02:02 Singular 523 526 *hannes: removed diophant_error, format -
libfac/factor/SqrFree.cc
r35cfa3 rb429551 2 2 /////////////////////////////////////////////////////////////////////////////// 3 3 // emacs edit mode for this file is -*- C++ -*- 4 static char * rcsid = "$Id: SqrFree.cc,v 1.1 2 2008-01-07 13:34:56Singular Exp $";4 static char * rcsid = "$Id: SqrFree.cc,v 1.13 2008-01-22 09:51:37 Singular Exp $"; 5 5 static char * errmsg = "\nYou found a bug!\nPlease inform (Michael Messollen) michael@math.uni-sb.de .\n Please include above information and your input (the ideal/polynomial and characteristic) in your bug-report.\nThank you."; 6 6 /////////////////////////////////////////////////////////////////////////////// … … 204 204 // needs not to be 1 !!!!! // 205 205 /////////////////////////////////////////////////////////////// 206 static CFFList207 SqrFreed( const CanonicalForm & r , const CanonicalForm &mipo=0){208 CanonicalForm h, g, f = r;209 CFFList Outputlist;210 int n = level(f);211 212 DEBINCLEVEL(CERR, "SqrFreed");213 DEBOUTLN(CERR, "Called with r= ", r);214 if (getNumVars(f)==0 ) { // just a constant; return it215 Outputlist= myappend(Outputlist,CFFactor(f,1));216 return Outputlist ;217 }218 219 // We look if we do have a content; if so, SqrFreed the content220 // and continue computations with pp(f)221 for (int k=1; k<=n; k++) {222 if ((mipo.level()==-1000000)||(k!=1))223 {224 g = swapvar(f,k,n); g = content(g);225 if ( ! (g.isOne() || (-g).isOne() || degree(g)==0 )) {226 g = swapvar(g,k,n);227 DEBOUTLN(CERR, "We have a content: ", g);228 Outputlist = myUnion(InternalSqrFree(g,mipo),Outputlist); // should we add a229 // SqrFreeTest(g) first ?230 DEBOUTLN(CERR, "Outputlist is now: ", Outputlist);231 f /=g;232 DEBOUTLN(CERR, "f is now: ", f);233 }234 }235 }236 237 // Now f is primitive; Let`s look if f is univariate238 if ( f.isUnivariate() ) {239 DEBOUTLN(CERR, "f is univariate: ", f);240 g = content(g);241 if ( ! (g.isOne() || (-g).isOne() ) ){242 Outputlist= myappend(Outputlist,CFFactor(g,1)) ;243 f /= g;244 }245 Outputlist = Union(sqrFree(f),Outputlist) ;246 DEBOUTLN(CERR, "Outputlist after univ. sqrFree(f) = ", Outputlist);247 DEBDECLEVEL(CERR, "SqrFreed");248 return Outputlist ;249 }250 251 // Linear?252 if ( totaldegree(f) <= 1 ) {253 Outputlist= myappend(Outputlist,CFFactor(f,1)) ;254 DEBDECLEVEL(CERR, "SqrFreed");255 return Outputlist ;256 }257 258 // is it Pth root?259 n=level(f); // maybe less indeterminants260 g= f.deriv();261 if ( getCharacteristic() > 0 && g.isZero() ){ // Pth roots only apply to char > 0262 for (int k=1; k<=n; k++)263 {264 if ((mipo.level()==-1000000)||(k!=1))265 {266 g=swapvar(f,k,n) ;267 g = g.deriv();268 269 if ( ! g.isZero() )270 { // can`t be Pth root271 CFFList Outputlist2= SqrFreed(swapvar(f,k,n));272 for (CFFListIterator inter=Outputlist2; inter.hasItem(); inter++){273 Outputlist= myappend(Outputlist, CFFactor(swapvar(inter.getItem().factor(),k,n), inter.getItem().exp()));274 }275 return Outputlist;276 }277 }278 if ( k==n )279 { // really is Pth power280 DEBOUTLN(CERR, "f is a p'th root: ", f);281 CFMap m;282 g = compress(f,m);283 if (mipo==0)284 f = m(PthRoot(g));285 else286 f = m(PthRoot(g,mipo));287 DEBOUTLN(CERR, " that is : ", f);288 // now : Outputlist union ( SqrFreed(f) )^getCharacteristic()289 Outputlist=myUnion(Powerup(InternalSqrFree(f),getCharacteristic()),Outputlist);290 DEBDECLEVEL(CERR, "SqrFreed");291 return Outputlist ;292 }293 }294 }295 g = f.deriv();296 DEBOUTLN(CERR, "calculating gcd of ", f);297 DEBOUTLN(CERR, " and ", g);298 h = gcd(f,pp(g)); h /= lc(h);299 DEBOUTLN(CERR,"gcd(f,g)= ",h);300 if ( (h.isOne()) || ( h==f) || ((-h).isOne()) || getNumVars(h)==0 ) { // no common factor301 Outputlist= myappend(Outputlist,CFFactor(f,1)) ;302 DEBOUTLN(CERR, "Outputlist= ", Outputlist);303 DEBDECLEVEL(CERR, "SqrFreed");304 return Outputlist ;305 }306 else // we can split into two nontrivial pieces307 {308 f /= h; // Now we have split the poly into f and h309 g = lc(f);310 //if ( g != f.genOne() && getNumVars(g) == 0 ){311 if ( (!g.isOne()) && getNumVars(g) == 0 )312 {313 Outputlist= myappend(Outputlist,CFFactor(g,1)) ;314 f /= g;315 }316 DEBOUTLN(CERR, "Split into f= ", f);317 DEBOUTLN(CERR, " and h= ", h);318 // For char > 0 the polys f and h can have Pth roots; so we need a test319 // Test is disabled because timing is the same320 321 // if ( SqrFreeTest(f,0) )322 // Outputlist= myappend(Outputlist,CFFactor(f,1)) ;323 // else324 Outputlist=myUnion(Outputlist, InternalSqrFree(f));325 // if ( SqrFreeTest(h,0) )326 // Outputlist= myappend(Outputlist,CFFactor(h,1)) ;327 // else328 Outputlist=myUnion(Outputlist,InternalSqrFree(h));329 DEBOUTLN(CERR, "Returning list ", Outputlist);330 DEBDECLEVEL(CERR, "SqrFreed");331 return Outputlist ;332 }333 #ifdef HAVE_SINGULAR_ERROR334 WerrorS("libfac: ERROR: SqrFreed: we should never fall trough here!");335 #else336 #ifndef NOSTREAMIO337 CERR << "\nlibfac: ERROR: SqrFreed: we should never fall trough here!\n"338 << rcsid << errmsg << "\n";339 #endif340 #endif341 DEBDECLEVEL(CERR, "SqrFreed");342 return Outputlist; // for safety purpose343 }344 345 ///////////////////////////////////////////////////////////////346 // The user front-end for the SqrFreed routine. //347 // Input can have a constant as content //348 ///////////////////////////////////////////////////////////////349 CFFList350 InternalSqrFree( const CanonicalForm & r , const CanonicalForm & mipo ){351 CanonicalForm g=icontent(r), f = r;352 CFFList Outputlist, Outputlist2;353 354 DEBINCLEVEL(CERR, "InternalSqrFree");355 DEBOUTMSG(CERR, rcsid);356 DEBOUTLN(CERR,"Called with f= ", f);357 358 // Take care of stupid users giving us constants359 if ( getNumVars(f) == 0 ) { // a constant ; Exp==1 even if f==0360 Outputlist= myappend(Outputlist,CFFactor(f,1));361 }362 else{363 // Now we are sure: we have a nonconstant polynomial364 g = lc(f);365 while ( getNumVars(g) != 0 ) g=content(g);366 if ( ! g.isOne() ) Outputlist= myappend(Outputlist,CFFactor(g,1)) ;367 f /= g;368 if ( getNumVars(f) != 0 ) // a real polynomial369 {370 if (mipo!=0)371 Outputlist=myUnion(SqrFreed(f,mipo),Outputlist) ;372 else373 Outputlist=myUnion(SqrFreed(f),Outputlist) ;374 }375 }376 DEBOUTLN(CERR,"Outputlist = ", Outputlist);377 for ( CFFListIterator i=Outputlist; i.hasItem(); i++ )378 if ( getNumVars(i.getItem().factor()) > 0 )379 Outputlist2.append(i.getItem());380 381 DEBOUTLN(CERR,"Outputlist2 = ", Outputlist2);382 DEBDECLEVEL(CERR, "InternalSqrFree");383 return Outputlist2 ;384 }385 206 386 207 CFFList 387 208 SqrFree(const CanonicalForm & r ){ 388 CFFList outputlist, sqrfreelist = InternalSqrFree(r);209 CFFList outputlist, sqrfreelist = sqrFree(r,0,false); 389 210 CFFListIterator i; 390 211 CanonicalForm elem; … … 418 239 /* 419 240 $Log: not supported by cvs2svn $ 241 Revision 1.12 2008/01/07 13:34:56 Singular 242 *hannes: omse optiomzations(isOne) 243 420 244 Revision 1.11 2007/05/15 14:46:49 Singular 421 245 *hannes: factorize in Zp(a)[x...] -
libfac/factor/SqrFree.h
r35cfa3 rb429551 2 2 //////////////////////////////////////////////////////////// 3 3 // emacs edit mode for this file is -*- C++ -*- 4 // $Id: SqrFree.h,v 1. 4 2002-08-19 11:11:34Singular Exp $4 // $Id: SqrFree.h,v 1.5 2008-01-22 09:51:37 Singular Exp $ 5 5 /////////////////////////////////////////////////////////////////////////////// 6 6 #ifndef SQRFREE_H … … 10 10 // CFFList SqrFree( const CanonicalForm & f ) ; 11 11 /*ENDPUBLIC*/ 12 CFFList InternalSqrFree( const CanonicalForm & f , const CanonicalForm & mipo=0) ;12 //CFFList InternalSqrFree( const CanonicalForm & f , const CanonicalForm & mipo=0) ; 13 13 int SqrFreeTest( const CanonicalForm & r, int opt=1) ; 14 14 CFFList SqrFree( const CanonicalForm & f ) ; … … 18 18 /* 19 19 $Log: not supported by cvs2svn $ 20 Revision 1.4 2002/08/19 11:11:34 Singular 21 * hannes/pfister: alg_gcd etc. 22 20 23 Revision 1.3 1997/09/12 07:19:51 Singular 21 24 * hannes/michael: libfac-0.3.0 -
libfac/factor/Truefactor.cc
r35cfa3 rb429551 2 2 /////////////////////////////////////////////////////////////////////////////// 3 3 // emacs edit mode for this file is -*- C++ -*- 4 //static char * rcsid = "@(#) $Id: Truefactor.cc,v 1.1 1 2008-01-07 13:34:56Singular Exp $";4 //static char * rcsid = "@(#) $Id: Truefactor.cc,v 1.12 2008-01-22 09:51:37 Singular Exp $"; 5 5 /////////////////////////////////////////////////////////////////////////////// 6 6 // Factory - Includes … … 229 229 CFFactor factor; 230 230 CFFList L,FAC,E_all; 231 int c,r = PiList.length(),degU, onemore,M, h = subvardegree(Ua,levelU) + 1;231 int c,r = PiList.length(),degU, onemore,M, h = totaldegree(Ua,1,levelU) + 1; 232 232 ListIterator<CFFactor> i; 233 233 … … 450 450 /* 451 451 $Log: not supported by cvs2svn $ 452 Revision 1.11 2008/01/07 13:34:56 Singular 453 *hannes: omse optiomzations(isOne) 454 452 455 Revision 1.10 2006/05/16 14:46:50 Singular 453 456 *hannes: gcc 4.1 fixes -
libfac/factor/helpstuff.cc
r35cfa3 rb429551 2 2 //////////////////////////////////////////////////////////// 3 3 // emacs edit mode for this file is -*- C++ -*- 4 // static char * rcsid = "$Id: helpstuff.cc,v 1. 5 2007-05-25 12:59:05Singular Exp $";4 // static char * rcsid = "$Id: helpstuff.cc,v 1.6 2008-01-22 09:51:37 Singular Exp $"; 5 5 //////////////////////////////////////////////////////////// 6 6 // FACTORY - Includes … … 32 32 if ( aa==bb ) { b=bb; } 33 33 else { b=aa; } 34 }35 36 // Now some procedures used in SqrFree and in Factor37 ///////////////////////////////////////////////////////////////38 ///////////////////////////////////////////////////////////////39 // We have to include a version of <CFFList>.append(CFFactor)//40 // and Union( CFFList, CFFList) //41 // because we have to look for multiplicities in SqrFree. //42 // e.g.: SqrFree( f^3 ) with char <> 3 //43 ///////////////////////////////////////////////////////////////44 CFFList45 myappend( const CFFList & Inputlist, const CFFactor & TheFactor){46 CFFList Outputlist ;47 CFFactor copy;48 CFFListIterator i;49 int exp=0;50 51 for ( i=Inputlist ; i.hasItem() ; i++ ){52 copy = i.getItem();53 if ( copy.factor() == TheFactor.factor() )54 exp += copy.exp();55 else56 Outputlist.append(copy);57 }58 Outputlist.append( CFFactor(TheFactor.factor(), exp + TheFactor.exp()));59 return Outputlist;60 }61 62 CFFList63 myUnion(const CFFList & Inputlist1,const CFFList & Inputlist2){64 CFFList Outputlist;65 CFFListIterator i;66 67 for ( i=Inputlist1 ; i.hasItem() ; i++ )68 Outputlist = myappend(Outputlist, i.getItem() );69 for ( i=Inputlist2 ; i.hasItem() ; i++ )70 Outputlist = myappend(Outputlist, i.getItem() );71 72 return Outputlist;73 }74 75 int76 Powerup( const int base , const int exp){77 int retvalue=1;78 if ( exp == 0 ) return retvalue ;79 else for ( int i=1 ; i <= exp; i++ ) retvalue *= base ;80 81 return retvalue;82 34 } 83 35 … … 128 80 129 81 /////////////////////////////////////////////////////////////// 130 // Return the deg of F in the Variables x_1,..,x_(levelF-1) //131 ///////////////////////////////////////////////////////////////132 int133 subvardegree( const CanonicalForm & F, int levelF ){134 int n=0,m=degree(F,levelF),newn=0;135 136 for ( int k=0; k<=m; k++ ){137 newn = totaldegree( F[k] );138 if ( newn > n ) n=newn;139 }140 return n;141 }142 143 ///////////////////////////////////////////////////////////////144 82 // Change poly: x_i <- x_i +- a_i for i= 1,..,level(f)-1 // 145 83 /////////////////////////////////////////////////////////////// … … 177 115 /* 178 116 $Log: not supported by cvs2svn $ 117 Revision 1.5 2007/05/25 12:59:05 Singular 118 *hannes: fdivides2 119 179 120 Revision 1.4 2001/06/19 15:29:04 Singular 180 121 *hannes: optim. -
libfac/factor/helpstuff.h
r35cfa3 rb429551 2 2 //////////////////////////////////////////////////////////// 3 3 // emacs edit mode for this file is -*- C++ -*- 4 // $Id: helpstuff.h,v 1. 4 2007-05-15 14:46:49Singular Exp $4 // $Id: helpstuff.h,v 1.5 2008-01-22 09:51:37 Singular Exp $ 5 5 //////////////////////////////////////////////////////////// 6 6 #ifndef HELPSTUFF_H … … 12 12 /////////////////////////////////////////////////////////////// 13 13 CanonicalForm mod_power( const CanonicalForm & f, int k, int levelU); 14 int subvardegree( const CanonicalForm & F, int levelF );15 14 CanonicalForm change_poly( const CanonicalForm & f , const SFormList & Substitutionlist, int directionback ); 16 15 … … 18 17 // Now some procedures used in SqrFree and in Factor 19 18 /////////////////////////////////////////////////////////////// 20 CFFList myappend( const CFFList & Inputlist, const CFFactor & TheFactor) ; 21 CFFList myUnion(const CFFList & Inputlist1,const CFFList & Inputlist2); 22 int Powerup( const int base , const int exp=1); 23 inline int min ( const int a, const int b ){ 19 inline int min ( const int a, const int b ) 20 { 24 21 return (a<=b ? a:b); 25 22 } 26 inline int max ( const int a, const int b ){ 23 inline int max ( const int a, const int b ) 24 { 27 25 return (a>b ? a:b); 28 26 } … … 32 30 /* 33 31 $Log: not supported by cvs2svn $ 32 Revision 1.4 2007/05/15 14:46:49 Singular 33 *hannes: factorize in Zp(a)[x...] 34 34 35 Revision 1.3 1997/09/12 07:19:57 Singular 35 36 * hannes/michael: libfac-0.3.0
Note: See TracChangeset
for help on using the changeset viewer.