Changeset 9e9b7c in git for libfac/charset/charset.cc
- Timestamp:
- May 31, 2008, 7:20:10 PM (16 years ago)
- Branches:
- (u'spielwiese', 'fe61d9c35bf7c61f2b6cbf1b56e25e2f08d536cc')
- Children:
- 434e4154dbfea91da1283c2a039af70b75a4e85e
- Parents:
- 2c3cda8da51049289f57702038ff42c44f290497
- File:
-
- 1 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
Note: See TracChangeset
for help on using the changeset viewer.