Changeset 9e9b7c in git
- Timestamp:
- May 31, 2008, 7:20:10 PM (15 years ago)
- Branches:
- (u'jengelh-datetime', 'ceac47cbc86fe4a15902392bdbb9bd2ae0ea02c6')(u'spielwiese', 'a800fe4b3e9d37a38c5a10cc0ae9dfa0c15a4ee6')
- Children:
- 434e4154dbfea91da1283c2a039af70b75a4e85e
- Parents:
- 2c3cda8da51049289f57702038ff42c44f290497
- Location:
- libfac
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
libfac/charset/charset.cc
r2c3cda r9e9b7c 2 2 //////////////////////////////////////////////////////////// 3 3 // emacs edit mode for this file is -*- C++ -*- 4 /* $Id: charset.cc,v 1.1 4 2008-04-08 16:19:09Singular Exp $ */4 /* $Id: charset.cc,v 1.15 2008-05-31 17:20:10 Singular Exp $ */ 5 5 ///////////////////////////////////////////////////////////// 6 6 // FACTORY - Includes … … 530 530 531 531 static CFList 532 irras( CFList & AS, int & ja, CanonicalForm & reducible){ 532 irras( CFList & AS, int & ja, CanonicalForm & reducible) 533 { 533 534 CFFList qs; 534 535 CFList ts,as; … … 539 540 ja = 0; 540 541 DEBOUTLN(CERR, "irras: called with: AS= ", AS); 541 for ( i=AS; i.hasItem(); i++ ){ 542 for ( i=AS; i.hasItem(); i++ ) 543 { 542 544 elem = i.getItem(); 543 545 nr += 1; … … 545 547 if ( degree(elem) > 1 ) // linear poly's are irreduzible 546 548 { 549 //qs = Factorize2(elem,CanonicalForm(0)); 547 550 qs = Factorize(elem); 548 } 549 else{ 551 // remove a constant 552 if (qs.getFirst().factor().degree()==0) qs.removeFirst(); 553 } 554 else 555 { 550 556 qs=(CFFactor(elem,1)); 551 qs.insert(CFFactor(CanonicalForm(1),1));552 557 } 553 558 DEBOUTLN(CERR, " = ", qs); … … 555 560 if ( interrupt_handle() ) return CFList() ; 556 561 // INTERRUPTHANDLER 557 qs.removeFirst(); 558 if ( (qs.length() >= 2 ) || (qs.getFirst().exp() > 1)){ 562 563 if ( (qs.length() >= 2 ) || (qs.getFirst().exp() > 1)) 564 { 559 565 DEBOUTLN(CERR, "irras: Setting ind=0, ja= ", nr); 560 566 ja=nr; ind=0; reducible= elem; … … 564 570 } 565 571 // CERR << "ind= " << ind << "\n"; 566 if ( (ind == 1) ){ //&& ( as.length() > 1) ){ 567 if ( irreducible(AS) ){ // as quasilinear? => irreducible! 572 if ( (ind == 1) ) //&& ( as.length() > 1) ) 573 { 574 if ( irreducible(AS) ) 575 { // as quasilinear? => irreducible! 568 576 ja = 0; 569 577 DEBOUTLN(CERR, "as is irreducible. as= ", AS); 570 578 } 571 else { 579 else 580 { 572 581 i=AS; 573 for ( nr=1; nr< AS.length(); nr++){ 582 for ( nr=1; nr< AS.length(); nr++) 583 { 574 584 as.append(i.getItem()); 575 585 i++; 576 if ( degree(i.getItem()) > 1 ){// search for a non linear elem 586 if ( degree(i.getItem()) > 1 ) 587 { // search for a non linear elem 577 588 elem=i.getItem(); 578 // CERR << "f= " << elem << "\n"; 579 // CERR << "as= " << as << "\n"; 580 qs= newfactoras(elem,as,success); 581 // CERR << "irras:newfactoras qs= " << qs << "\n"; 582 // qs= factoras(elem,as,success); 583 // CERR << "irras:factoras qs= " << qs << "\n"; 584 if ( qs.length() > 1 || qs.getFirst().exp() > 1 ){ //found elem is reducible 589 if (as.length()==1) 590 qs = Factorize2(elem,as.getFirst()); 591 else 592 qs= newfactoras(elem,as,success); 593 if ( qs.length() > 1 || qs.getFirst().exp() > 1 ) 594 { //found elem is reducible 585 595 reducible=elem; 586 596 ja=nr+1; … … 595 605 return ts; 596 606 } 607 597 608 /////////////////////////////////////////////////////////////////////////////// 598 609 /* 599 610 $Log: not supported by cvs2svn $ 611 Revision 1.14 2008/04/08 16:19:09 Singular 612 *hannes: removed rcsid 613 600 614 Revision 1.13 2008/03/18 17:46:14 Singular 601 615 *hannes: gcc 4.2 -
libfac/factor/Factor.cc
r2c3cda r9e9b7c 1 1 /* Copyright 1996 Michael Messollen. All rights reserved. */ 2 2 /////////////////////////////////////////////////////////////////////////////// 3 /* $Id: Factor.cc,v 1.4 5 2008-04-08 16:19:10 Singular Exp $ */3 /* $Id: Factor.cc,v 1.46 2008-05-31 17:20:10 Singular Exp $ */ 4 4 static const char * errmsg = "\nYou found a bug!\nPlease inform singular@mathematik.uni-kl.de\nPlease include above information and your input (the ideal/polynomial and characteristic) in your bug-report.\nThank you."; 5 5 /////////////////////////////////////////////////////////////////////////////// … … 880 880 CFFList Factorize(const CanonicalForm & F, int is_SqrFree ) 881 881 { 882 out_cf("Factorize ",F,"\n"); 882 883 CFFList Outputlist,SqrFreeList,Intermediatelist,Outputlist2; 883 884 ListIterator<CFFactor> i,j; … … 893 894 DEBINCLEVEL(CERR, "Factorize"); 894 895 DEBOUTLN(CERR, "Called with F= ", F); 895 if ( getCharacteristic() == 0)896 if (( getCharacteristic() == 0 ) || (F.isUnivariate())) 896 897 { // char == 0 897 898 TIMING_START(factorize_time); … … 910 911 // search an "optimal" main variavble 911 912 int mv=F.level(); 912 if ((mv != LEVELBASE) && (! F.isUnivariate()))913 if ((mv != LEVELBASE) /* && (! F.isUnivariate()) */) 913 914 { 914 915 mv=find_mvar(F); … … 940 941 else 941 942 SqrFreeList.append(CFFactor(F,1)); 943 942 944 DEBOUTLN(CERR, "SqrFreeMV= ", SqrFreeList); 943 945 for ( i=SqrFreeList; i.hasItem(); i++ ) … … 952 954 if ( g.isUnivariate() ) 953 955 { 956 out_cf("univ. poly: ",g,"\n"); 954 957 Intermediatelist=factorize(g,1); // poly is sqr-free! 955 958 for ( j=Intermediatelist; j.hasItem(); j++ ) … … 1009 1012 swapvar(F,Variable(mv),F.mvar()); 1010 1013 } 1011 1012 1014 DEBDECLEVEL(CERR, "Factorize"); 1013 1015 TIMING_END(factorize_time); … … 1333 1335 /* 1334 1336 $Log: not supported by cvs2svn $ 1337 Revision 1.45 2008/04/08 16:19:10 Singular 1338 *hannes: removed rcsid 1339 1335 1340 Revision 1.44 2008/03/18 17:46:15 Singular 1336 1341 *hannes: gcc 4.2 -
libfac/factor/Factor.h
r2c3cda r9e9b7c 2 2 //////////////////////////////////////////////////////////// 3 3 // emacs edit mode for this file is -*- C++ -*- 4 // $Id: Factor.h,v 1. 5 2002-08-19 11:11:33Singular Exp $4 // $Id: Factor.h,v 1.6 2008-05-31 17:20:10 Singular Exp $ 5 5 /////////////////////////////////////////////////////////////////////////////// 6 6 #ifndef FACTOR_H … … 11 11 CFFList Factorize( const CanonicalForm & F, int is_SqrFree=0 ) ; 12 12 CFFList Factorize( const CanonicalForm & F, const CanonicalForm & mi, int is_SqrFree=0 ) ; 13 CFFList Factorize2(CanonicalForm F, const CanonicalForm & minpoly ); 13 14 /*ENDPUBLIC*/ 14 15 … … 18 19 /* 19 20 $Log: not supported by cvs2svn $ 21 Revision 1.5 2002/08/19 11:11:33 Singular 22 * hannes/pfister: alg_gcd etc. 23 20 24 Revision 1.4 2002/07/30 15:05:38 Singular 21 25 *hannes: added Factorize for alg. ext. -
libfac/factor/SqrFree.cc
r2c3cda r9e9b7c 2 2 /////////////////////////////////////////////////////////////////////////////// 3 3 // emacs edit mode for this file is -*- C++ -*- 4 /* $Id: SqrFree.cc,v 1.2 0 2008-05-14 12:38:26Singular Exp $ */4 /* $Id: SqrFree.cc,v 1.21 2008-05-31 17:20:10 Singular Exp $ */ 5 5 static const char * errmsg = "\nYou found a bug!\nPlease inform singular@mathematik.uni-kl.de\n Please include above information and your input (the ideal/polynomial and characteristic) in your bug-report.\nThank you."; 6 6 /////////////////////////////////////////////////////////////////////////////// … … 388 388 if (!mipo.isZero()) 389 389 { 390 #if 1390 #if 0 391 391 Variable alpha=rootOf(mipo); 392 392 CanonicalForm ff=replacevar(f,mipo.mvar(),alpha); … … 455 455 /* 456 456 $Log: not supported by cvs2svn $ 457 Revision 1.20 2008/05/14 12:38:26 Singular 458 *hannes: swapvar ->replacevar 459 457 460 Revision 1.19 2008/05/05 14:54:29 Singular 458 461 *hannes: switch representation and normalize in SqrFreeMV
Note: See TracChangeset
for help on using the changeset viewer.