Changeset d81ed62 in git for factory/fac_multivar.cc
- Timestamp:
- Apr 15, 1997, 4:01:08 PM (27 years ago)
- Branches:
- (u'spielwiese', 'fe61d9c35bf7c61f2b6cbf1b56e25e2f08d536cc')
- Children:
- 4f735a2b497ba9418f4b17d84c6b9bbbaf8130a4
- Parents:
- 6ea5315ed3f847fbead0d0e978f16d1cfac98904
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
factory/fac_multivar.cc
r6ea5315 rd81ed62 1 1 // emacs edit mode for this file is -*- C++ -*- 2 // $Id: fac_multivar.cc,v 1. 4 1997-04-08 10:30:59schmidt Exp $2 // $Id: fac_multivar.cc,v 1.5 1997-04-15 14:01:08 schmidt Exp $ 3 3 4 4 /* 5 5 $Log: not supported by cvs2svn $ 6 Revision 1.4 1997/04/08 10:30:59 schmidt 7 #include <config.h> added 8 6 9 Revision 1.3 1997/03/27 09:47:17 schmidt 7 10 debug output rewritten … … 99 102 // nonDivisors ( CanonicalForm omega, CanonicalForm delta, const CFArray & F, CFArray & d ) 100 103 // { 101 // DEBOUTLN( cerr, "nondivisors omega = " ,omega );102 // DEBOUTLN( cerr, "nondivisors delta = " ,delta );103 // DEBOUTLN( cerr, "nondivisors F = " ,F );104 // DEBOUTLN( cerr, "nondivisors omega = " << omega ); 105 // DEBOUTLN( cerr, "nondivisors delta = " << delta ); 106 // DEBOUTLN( cerr, "nondivisors F = " << F ); 104 107 // CanonicalForm q, r; 105 108 // int k = F.size(); … … 137 140 if ( Vn != 0 ) { 138 141 U0 = A( U ); 139 DEBOUTLN( cerr, "U0 = " ,U0 );142 DEBOUTLN( cerr, "U0 = " << U0 ); 140 143 if ( isSqrFree( U0 ) ) { 141 144 delta = content( U0 ); 142 DEBOUTLN( cerr, "content( U0 ) = " ,delta );145 DEBOUTLN( cerr, "content( U0 ) = " << delta ); 143 146 for ( I = F, j = 1; I.hasItem(); I++, j++ ) 144 147 FF[j] = A( I.getItem().factor() ); … … 146 149 } 147 150 else { 148 DEBOUTLN( cerr, "not sqrfree : ",sqrFree( U0 ) );151 DEBOUTLN( cerr, "not sqrfree : " << sqrFree( U0 ) ); 149 152 } 150 153 } … … 173 176 bool negate = false; 174 177 175 DEBOUTLN( cerr, "-----------------------------------------------------" , ' ');176 DEBOUTLN( cerr, "trying to factorize U = " ,U );177 DEBOUTLN( cerr, "U is a polynomial of level = " ,arg.level() );178 DEBOUTLN( cerr, "U will be factorized with respect to variable " ,Variable(1) );179 DEBOUTLN( cerr, "the leading coefficient of U with respect to that variable is " ,V );180 DEBOUTLN( cerr, "which is factorized as " ,F );178 DEBOUTLN( cerr, "-----------------------------------------------------" ); 179 DEBOUTLN( cerr, "trying to factorize U = " << U ); 180 DEBOUTLN( cerr, "U is a polynomial of level = " << arg.level() ); 181 DEBOUTLN( cerr, "U will be factorized with respect to variable " << Variable(1) ); 182 DEBOUTLN( cerr, "the leading coefficient of U with respect to that variable is " << V ); 183 DEBOUTLN( cerr, "which is factorized as " << F ); 181 184 182 185 maxdeg = 0; … … 208 211 findEvaluation( U, V, omega, F, A, U0, delta, D, r ); 209 212 TIMING_END(fac_findeval); 210 DEBOUTLN( cerr, "the evaluation point to reduce to an univariate problem is " ,A );211 DEBOUTLN( cerr, "corresponding delta = " ,delta );212 DEBOUTLN( cerr, " omega = " ,omega );213 DEBOUTLN( cerr, " D = " ,D );214 DEBOUTLN( cerr, "now factorize the univariate polynomial " ,U0 );213 DEBOUTLN( cerr, "the evaluation point to reduce to an univariate problem is " << A ); 214 DEBOUTLN( cerr, "corresponding delta = " << delta ); 215 DEBOUTLN( cerr, " omega = " << omega ); 216 DEBOUTLN( cerr, " D = " << D ); 217 DEBOUTLN( cerr, "now factorize the univariate polynomial " << U0 ); 215 218 G = conv_to_factor_array( factorize( U0, false ) ); 216 DEBOUTLN( cerr, "which factorizes into " ,G );219 DEBOUTLN( cerr, "which factorizes into " << G ); 217 220 b = coeffBound( U, getZFacModulus().getp() ); 218 221 if ( getZFacModulus().getpk() > b.getpk() ) 219 222 b = getZFacModulus(); 220 DEBOUTLN( cerr, "the coefficient bound of the factors of U is " ,b.getpk() );223 DEBOUTLN( cerr, "the coefficient bound of the factors of U is " << b.getpk() ); 221 224 222 225 r = G.size(); 223 226 lcG = CFArray( 1, r ); 224 227 UU = U; 225 DEBOUTLN( cerr, "now trying to distribute the leading coefficients ..." , ' ');228 DEBOUTLN( cerr, "now trying to distribute the leading coefficients ..." ); 226 229 TIMING_START(fac_distrib); 227 230 goodeval = distributeLeadingCoeffs( UU, G, lcG, F, D, delta, omega, A, r ); … … 229 232 #ifdef DEBUGOUTPUT 230 233 if ( goodeval ) { 231 DEBOUTLN( cerr, "the univariate factors after distribution are " ,G );232 DEBOUTLN( cerr, "the distributed leading coeffs are " ,lcG );233 DEBOUTLN( cerr, "U may have changed and is now " ,UU );234 DEBOUTLN( cerr, "which has leading coefficient " ,LC( UU, Variable(1) ) );234 DEBOUTLN( cerr, "the univariate factors after distribution are " << G ); 235 DEBOUTLN( cerr, "the distributed leading coeffs are " << lcG ); 236 DEBOUTLN( cerr, "U may have changed and is now " << UU ); 237 DEBOUTLN( cerr, "which has leading coefficient " << LC( UU, Variable(1) ) ); 235 238 236 239 if ( LC( UU, Variable(1) ) != prod( lcG ) || A(UU) != prod( G ) ) { 237 DEBOUTLN( cerr, "!!! distribution was not correct !!!" , ' ');238 DEBOUTLN( cerr, "product of leading coeffs is " ,prod( lcG ) );239 DEBOUTLN( cerr, "product of univariate factors is " ,prod( G ) );240 DEBOUTLN( cerr, "the new U is evaluated as " ,A(UU) );240 DEBOUTLN( cerr, "!!! distribution was not correct !!!" ); 241 DEBOUTLN( cerr, "product of leading coeffs is " << prod( lcG ) ); 242 DEBOUTLN( cerr, "product of univariate factors is " << prod( G ) ); 243 DEBOUTLN( cerr, "the new U is evaluated as " << A(UU) ); 241 244 } 242 245 else 243 DEBOUTLN( cerr, "leading coeffs correct" , ' ');246 DEBOUTLN( cerr, "leading coeffs correct" ); 244 247 } 245 248 else { 246 DEBOUTLN( cerr, "we have found a bad evaluation point" , ' ');249 DEBOUTLN( cerr, "we have found a bad evaluation point" ); 247 250 } 248 251 #endif … … 297 300 n = i.getItem().exp(); 298 301 TIMING_END(fac_content); 299 DEBOUTLN( cerr, "now after content ..." , ' ');302 DEBOUTLN( cerr, "now after content ..." ); 300 303 if ( g.isUnivariate() ) { 301 304 G = factorize( g, true );
Note: See TracChangeset
for help on using the changeset viewer.