Changeset f78374 in git

Ignore:
Timestamp:
Dec 13, 2011, 1:49:48 PM (11 years ago)
Branches:
(u'jengelh-datetime', 'ceac47cbc86fe4a15902392bdbb9bd2ae0ea02c6')(u'spielwiese', 'a800fe4b3e9d37a38c5a10cc0ae9dfa0c15a4ee6')
Children:
f41d12e69588befe7fc3383e41747d4ac6575de4
Parents:
3ef9c82a32b5b066dbd0e7b53857aa1fe70108a5
Message:
chg: more changes of squarefree decomposition according to master
Files:
5 edited

Unmodified
Removed
• factory/cf_algorithm.h

 r3ef9c8 CFFList factorize ( const CanonicalForm & f, const Variable & alpha ); CFFList sqrFree ( const CanonicalForm & f ); CFFList sqrFree ( const CanonicalForm & f, bool sort= false ); bool isSqrFree ( const CanonicalForm & f );
• factory/cf_factor.cc

 r3ef9c8 #include "cf_algorithm.h" #include "facFqFactorize.h" #include "facFqSquarefree.h" #include "cf_map.h" #include "algext.h" } CFFList sqrFree ( const CanonicalForm & f ) CFFList sqrFree ( const CanonicalForm & f, bool sort ) { //    ASSERT( f.isUnivariate(), "multivariate factorization not implemented" ); result = sqrFreeZ( f ); else result = sqrFreeFp( f ); //return ( sort ? sortCFFList( result ) : result ); { Variable alpha; if (hasFirstAlgVar (f, alpha)) result = FqSqrf( f, alpha ); else result= FpSqrf (f); } if (sort) { CFFactor buf= result.getFirst(); result.removeFirst(); result= sortCFFList (result); result.insert (buf); } return result; }
• factory/fac_multivar.cc

 r3ef9c8 { if ( i.getItem().factor().inCoeffDomain() ) { if ( ! i.getItem().factor().isOne() ) R.append( CFFactor( i.getItem().factor(), i.getItem().exp() ) ); } R.append( CFFactor( i.getItem().factor(), i.getItem().exp() ) ); else {
• factory/fac_sqrfree.cc

 r3ef9c8 #include "canonicalform.h" #include "cf_map.h" #include "cf_algorithm.h" static int divexp = 1; if ( a.inCoeffDomain() ) return CFFactor( a, 1 ); CanonicalForm cont = content( a ); CanonicalForm aa = a / cont; CanonicalForm aa, LcA; if (isOn (SW_RATIONAL)) { LcA= bCommonDen (a); aa= a*LcA; } else { LcA= icontent (a); if (lc (a).sign() < 0) LcA= -LcA; aa= a/LcA; } CanonicalForm cont = content( aa ); aa /= cont; CanonicalForm b = aa.deriv(), c = gcd( aa, b ); CanonicalForm y, z, w = aa / c; if ( degree( z, v ) > 0 ) { if ( lc( z ).sign() < 0 ) F.append( CFFactor( -z, i ) ); else F.append( CFFactor( z, i ) ); if (isOn (SW_RATIONAL)) { z /= Lc (z); z *= bCommonDen (z); } if (lc (z).sign() < 0) z= -z; F.append( CFFactor( z, i ) ); } i++; if ( degree( w,v ) > 0 ) { if ( lc( w ).sign() < 0 ) F.append( CFFactor( -w, i ) ); else F.append( CFFactor( w, i ) ); if (isOn (SW_RATIONAL)) { w /= Lc (w); w *= bCommonDen (w); } if (lc (w).sign() < 0) w= -w; F.append( CFFactor( w, i ) ); } if ( ! cont.isOne() ) F = Union( F, sqrFreeZ( cont ) ); if ( lc( a ).sign() < 0 ) { if ( F.getFirst().exp() == 1 ) { CanonicalForm f = F.getFirst().factor(); CFFListIterator(F).getItem() = CFFactor( -f, 1 ); } else F.insert( CFFactor( -1, 1 ) ); } { CFFList buf= sqrFreeZ (cont); buf.removeFirst(); F = Union( F, buf ); } F.insert (CFFactor (LcA, 1)); return F; }
• libpolys/polys/clapsing.cc

 r3ef9c8 number N=NULL; number NN=NULL; number old_lead_coeff=n_Copy(pGetCoeff(f), r->cf); if (!rField_is_Zp(r) && !rField_is_Zp_a(r)) /* Q, Q(a) */ res->m[0]=p_One(r); } } if (N!=NULL) { p_Mult_nn(res->m[0],N,r); n_Delete(&N,r->cf); N=NULL; } } if (rField_is_Q_a(r) && (r->cf->extRing->minideal!=NULL)) { int i=IDELEMS(res)-1; int stop=1; if (with_exps!=0) stop=0; for(;i>=stop;i--) { p_Norm(res->m[i],r); } if (with_exps==0) p_SetCoeff(res->m[0],old_lead_coeff,r); else n_Delete(&old_lead_coeff,r->cf); } else n_Delete(&old_lead_coeff,r->cf); p_Delete(&f,r); errorreported=save_errorreported; if (res==NULL) WerrorS( feNotImplemented ); if (NN!=NULL) { n_Delete(&NN,r->cf); } if (N!=NULL) { n_Delete(&N,r->cf); } return res; }
Note: See TracChangeset for help on using the changeset viewer.