Changeset a81073 in git
- Timestamp:
- Jan 22, 2008, 10:29:08 AM (15 years ago)
- Branches:
- (u'spielwiese', '8d54773d6c9e2f1d2593a28bc68b7eeab54ed529')
- Children:
- c6d3744af7f072c74673ab0aef31dfe80c1c9ae9
- Parents:
- af0ef61c8831698375f12ed2c1c9a817c7370ae9
- Location:
- factory
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
factory/cf_factor.cc
raf0ef6 ra81073 1 1 /* emacs edit mode for this file is -*- C++ -*- */ 2 /* $Id: cf_factor.cc,v 1.3 7 2008-01-15 12:36:50Singular Exp $ */2 /* $Id: cf_factor.cc,v 1.38 2008-01-22 09:28:22 Singular Exp $ */ 3 3 4 4 //{{{ docu … … 481 481 { 482 482 // char p, not univariate 483 printf("factorize char p, not univariate\n"); 484 } 485 } 486 else 483 //printf("factorize char p, not univariate\n"); 484 F = FpFactorizeMultivariate( f, issqrfree ); 485 } 486 } 487 else // char 0 487 488 { 488 489 bool on_rational = isOn(SW_RATIONAL); … … 701 702 } 702 703 703 CFFList sqrFree ( const CanonicalForm & f, bool sort ) 704 { 705 // ASSERT( f.isUnivariate(), "multivariate factorization not implemented" ); 704 CFFList sqrFree ( const CanonicalForm & f, const CanonicalForm & mipo, bool sort ) 705 { 706 if ( getNumVars(f) == 0 ) 707 return CFFactor(f,1); 708 706 709 CFFList result; 710 CanonicalForm c; 711 if (getCharacteristic() == 0 ) c=icontent(f); 712 else c=f.lc(); 713 CanonicalForm g=f; 714 if (!c.isOne()) 715 { 716 result=CFFactor(c,1); 717 g/=c; 718 } 707 719 708 720 if ( getCharacteristic() == 0 ) 709 result = sqrFreeZ( f);721 result=Union(result,sqrFreeZ( g, mipo )); 710 722 else 711 result = sqrFreeFp( f);723 result=Union(result,sqrFreeFp( g, mipo )); 712 724 713 725 return ( sort ? sortCFFList( result ) : result ); -
factory/fac_distrib.cc
raf0ef6 ra81073 1 1 /* emacs edit mode for this file is -*- C++ -*- */ 2 /* $Id: fac_distrib.cc,v 1. 8 2006-05-16 13:43:18Singular Exp $ */2 /* $Id: fac_distrib.cc,v 1.9 2008-01-22 09:28:39 Singular Exp $ */ 3 3 4 4 #include <config.h> … … 69 69 lcG[j] = 1; 70 70 71 for ( I = F, i = 1; I.hasItem(); I++, i++ ) { 71 for ( I = F, i = 1; I.hasItem(); I++, i++ ) 72 { 72 73 ft = I.getItem().factor(); 73 74 m = I.getItem().exp(); … … 76 77 DEBOUTLN( cerr, "and contained to the power of " << m ); 77 78 j = 1; 78 while ( m > 0 && j <= r ) { 79 while ( m > 0 && j <= r ) 80 { 79 81 ut = lc( G[j] ); 80 82 DEBOUTLN( cerr, "checking with " << ut ); 81 while ( m > 0 && fdivides( D[i], ut ) ) { 83 while ( m > 0 && fdivides( D[i], ut ) ) 84 { 82 85 DEBOUTLN( cerr, "match found" ); 83 86 m--; ut /= D[i]; … … 86 89 j++; 87 90 } 88 if (m != 0) { 91 if (m != 0) 92 { 89 93 DEBDECLEVEL( cerr, "distributeLeadingCoeffs" ); 90 94 return false; … … 92 96 } 93 97 DEBOUTLN( cerr, "the leading coeffs before omega and delta correction: " << lcG ); 94 if ( omega != 1 ) { 95 for ( j = 1; j <= r; j++ ) { 98 if ( omega != 1 ) 99 { 100 for ( j = 1; j <= r; j++ ) 101 { 96 102 // G[j] *= omega; 97 103 lcG[j] *= omega; … … 100 106 U *= power( omega, r-1 ); 101 107 } 102 if ( delta != 1 ) { 103 for ( j = 1; j <= r; j++ ) { 108 if ( delta != 1 ) 109 { 110 for ( j = 1; j <= r; j++ ) 111 { 104 112 lcG[j] *= delta; 105 113 G[j] = G[j] * ( A( lcG[j] ) / lc( G[j] ) ); -
factory/fac_multihensel.cc
raf0ef6 ra81073 1 1 /* emacs edit mode for this file is -*- C++ -*- */ 2 /* $Id: fac_multihensel.cc,v 1. 8 2002-10-10 17:43:40Singular Exp $ */2 /* $Id: fac_multihensel.cc,v 1.9 2008-01-22 09:29:08 Singular Exp $ */ 3 3 4 4 #include <config.h> … … 312 312 313 313 Uk[t] = U; 314 for ( k = t-1; k > 1; k-- ) { 314 for ( k = t-1; k > 1; k-- ) 315 { 315 316 Uk[k] = Uk[k+1]( A[k+1], Variable( k+1 ) ); 316 317 n[k] = degree( Uk[k], Variable( k ) ); 317 318 } 318 for ( k = A.min(); goodeval && (k <= t); k++ ) { 319 for ( k = A.min(); goodeval && (k <= t); k++ ) 320 { 319 321 h = totaldegree( Uk[k], Variable(A.min()), Variable(k-1) ); 320 322 for ( i = A.min(); i <= k; i++ )
Note: See TracChangeset
for help on using the changeset viewer.