Changeset 405ebc in git for libfac/charset/algfactor.cc
- Timestamp:
- Jun 27, 2001, 3:58:06 PM (23 years ago)
- Branches:
- (u'spielwiese', 'fe61d9c35bf7c61f2b6cbf1b56e25e2f08d536cc')
- Children:
- 409020f4846b2e67e3e541d8288ef4e479652c98
- Parents:
- c7bbf368257aae665cbcd55c9a3d18af43aa3dc0
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
libfac/charset/algfactor.cc
rc7bbf3 r405ebc 3 3 // emacs edit mode for this file is -*- C++ -*- 4 4 //////////////////////////////////////////////////////////// 5 static char * rcsid = "$Id: algfactor.cc,v 1. 4 2001-06-21 14:57:04Singular Exp $";5 static char * rcsid = "$Id: algfactor.cc,v 1.5 2001-06-27 13:58:05 Singular Exp $"; 6 6 //////////////////////////////////////////////////////////// 7 7 // FACTORY - Includes … … 28 28 #include "timing.h" 29 29 TIMING_DEFINE_PRINT(newfactoras_time); 30 31 int hasVar(const CanonicalForm &f, const Variable &v); 30 32 31 33 static CFFList … … 146 148 // check trivial case: 147 149 if ( degree(f, order.getLast())==0 || degree(g, order.getLast())==0) 150 { 151 DEBOUTLN(cout, "algcd Result= ", 1); 148 152 return CanonicalForm(1); 149 153 } 150 154 151 155 CFList bs; bs.append(f); bs.append(g); … … 163 167 { 164 168 result= cs.getLast(); 165 result/=result.Lc(); 169 CanonicalForm c=vcontent(result,Variable(1)); 170 //CanonicalForm c=result.Lc(); 171 result/=c; 172 for(CFListIterator i=as;i.hasItem(); i++ ) 173 { 174 if(hasVar(result,i.getItem().mvar())) 175 { 176 c=vcontent(result,Variable(i.getItem().level()+1)); 177 result/=c; 178 } 179 } 166 180 } 167 181 else result= CanonicalForm(1); 168 DEBOUTLN(cout, " Result= ", result);182 DEBOUTLN(cout, "algcd Result= ", result); 169 183 return result; 170 184 } … … 340 354 DEBOUT(cout, ",", fp(substback,vf)); 341 355 DEBOUT(cout, ") over K_r wrt ", vf); 342 //cout << "algcd(" << g << "," << fp(substback,vf) << " as:" << as <<endl;343 356 fp= algcd(g,fp(substback,vf), as, oldord); 344 //cout << "algcd res:" << fp << endl;345 357 DEBOUTLN(cout, " = ", fp); 346 358 if ( degree(fp,vf) > 0 ){ //otherwise it's a constant … … 360 372 DEBOUT(cout, ",", fp(substback,vf)); 361 373 DEBOUT(cout, ") over K_r wrt ", vf); 362 //cout << "algcd(" << g << "," << fp(substback,vf) << " as:" << as <<endl;363 374 fp= algcd(g,fp(substback,vf), as, oldord); 364 //cout << "algcd res:" << fp << endl;365 375 DEBOUTLN(cout, " = ", fp); 366 376 if ( degree(fp,vf) > 0 ){ //otherwise it's a constant … … 438 448 /* 439 449 $Log: not supported by cvs2svn $ 450 Revision 1.4 2001/06/21 14:57:04 Singular 451 *hannes/GP: Factorize, newfactoras, ... 452 440 453 Revision 1.3 2001/06/18 08:44:40 pfister 441 454 * hannes/GP/michael: factory debug, Factorize
Note: See TracChangeset
for help on using the changeset viewer.