Changeset 863b03 in git
- Timestamp:
- Mar 17, 2014, 8:35:01 PM (10 years ago)
- Branches:
- (u'spielwiese', '8e0ad00ce244dfd0756200662572aef8402f13d5')
- Children:
- 9c9ed172d6031851741d232b305ae98555a7d88f
- Parents:
- 789a7e93154cff0756258fc1aea3331cb78f20a8
- git-author:
- Martin Lee <martinlee84@web.de>2014-03-17 20:35:01+01:00
- git-committer:
- Martin Lee <martinlee84@web.de>2014-03-18 12:02:41+01:00
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
factory/libfac/charset/alg_factor.cc
r789a7e r863b03 1030 1030 newfactoras( const CanonicalForm & f, const CFList & as, int &success) 1031 1031 { 1032 bool isRat= isOn (SW_RATIONAL); 1033 if (!isRat) 1034 On (SW_RATIONAL); 1032 1035 Variable vf=f.mvar(); 1033 1036 CFListIterator i; … … 1050 1053 // ||( (as.length()==1) && (degree(f,vf)==3) && (degree(as.getFirst()==2)) ) 1051 1054 DEBDECLEVEL(CERR,"newfactoras"); 1055 if (!isRat) 1056 Off (SW_RATIONAL); 1052 1057 return CFFList(CFFactor(f,1)); 1053 1058 } … … 1079 1084 if ( Astar.length() == 0 ){ 1080 1085 DEBDECLEVEL(CERR,"newfactoras"); 1086 if (!isRat) 1087 Off (SW_RATIONAL); 1081 1088 return CFFList(CFFactor(f,1)); 1082 1089 } … … 1110 1117 CFFList result= newfactoras (Ggcd,as,success); //Ggcd is the squarefree part of f 1111 1118 multiplicity (result, f, Astar); 1119 if (!isRat) 1120 Off (SW_RATIONAL); 1112 1121 return result; 1113 1122 } … … 1116 1125 Fgcd= pp(Fgcd); Ggcd= pp(Ggcd); 1117 1126 DEBDECLEVEL(CERR,"newfactoras"); 1127 if (!isRat) 1128 Off (SW_RATIONAL); 1118 1129 return myUnion(newfactoras(Fgcd,as,success) , newfactoras(Ggcd,as,success)); 1119 1130 } 1120 1131 if ( getCharacteristic() > 0 ) 1121 1132 { 1133 if (!isRat) 1134 Off (SW_RATIONAL); 1122 1135 // First look for extension! 1123 1136 IntList degreelist; … … 1164 1177 Variable vminpoly; 1165 1178 Factorlist= alg_factor(f, Astar, vminpoly, oldord, as, isFunctionField); 1166 DEBDECLEVEL(CERR,"newfactoras"); 1167 return Factorlist; 1179 DEBDECLEVEL(CERR,"newfactoras"); 1180 if (!isRat) 1181 Off (SW_RATIONAL); 1182 return Factorlist; 1168 1183 } 1169 1184 … … 1175 1190 newcfactor(const CanonicalForm & f, const CFList & as, int & success ) 1176 1191 { 1177 On (SW_RATIONAL); 1192 bool isRat= isOn (SW_RATIONAL); 1193 if (!isRat) 1194 On (SW_RATIONAL); 1178 1195 CFFList Output, output, Factors= factorize(f); 1179 1196 if (Factors.getFirst().factor().inCoeffDomain()) … … 1182 1199 if ( as.length() == 0 ) 1183 1200 { 1201 if (!isRat) 1202 Off (SW_RATIONAL); 1184 1203 success=1; 1185 1204 return Factors; … … 1187 1206 if ( cls(f) <= cls(as.getLast()) ) 1188 1207 { 1208 if (!isRat) 1209 Off (SW_RATIONAL); 1189 1210 success=1; 1190 1211 return Factors; … … 1198 1219 Output = myappend(Output,CFFactor(j.getItem().factor(),j.getItem().exp()*i.getItem().exp())); 1199 1220 } 1221 1222 if (!isRat) 1223 Off (SW_RATIONAL); 1200 1224 return Output; 1201 1225 }
Note: See TracChangeset
for help on using the changeset viewer.