Changeset feed237 in git for libpolys/polys/clapsing.cc
 Timestamp:
 Apr 30, 2013, 3:48:57 PM (10 years ago)
 Branches:
 (u'jengelhdatetime', 'ceac47cbc86fe4a15902392bdbb9bd2ae0ea02c6')(u'spielwiese', '1d362c315e551a5b527ab0759f8839cf0e94f3a5')
 Children:
 81626e384392f28e77ebb8b19445f7959194d982
 Parents:
 08a955b3ca689a48afd7f7c5849c4179954a1ddb
 gitauthor:
 Martin Lee <martinlee84@web.de>20130430 15:48:57+02:00
 gitcommitter:
 Martin Lee <martinlee84@web.de>20130502 11:42:46+02:00
 File:

 1 edited
Legend:
 Unmodified
 Added
 Removed

libpolys/polys/clapsing.cc
r08a955 rfeed237 1025 1025 return res; 1026 1026 } 1027 #ifdef HAVE_NTL 1028 ideal singclap_absBiFactorize ( poly f, ideal & mipos, intvec ** exps, int & numFactors, const ring r) 1029 { 1030 p_Test(f, r); 1031 1032 ideal res=NULL; 1033 1034 int offs = rPar(r); 1035 if (f==NULL) 1036 { 1037 res= idInit (1, 1); 1038 mipos= idInit (1, 1); 1039 mipos>m[0]= convFactoryPSingTrP (Variable (offs), r); //overkill 1040 (*exps)=new intvec (1); 1041 (**exps)[0]= 1; 1042 numFactors= 0; 1043 return res; 1044 } 1045 CanonicalForm F( convSingTrPFactoryP( f, r) ); 1046 1047 if (getNumVars (F) > 2) 1048 { 1049 WerrorS( feNotImplemented ); 1050 return res; 1051 } 1052 CFAFList absFactors= absFactorize (F); 1053 1054 int n= absFactors.length(); 1055 *exps=new intvec (n); 1056 1057 res= idInit (n, 1); 1058 1059 mipos= idInit (n, 1); 1060 1061 Variable x= Variable (offs); 1062 Variable alpha; 1063 int i= 0; 1064 numFactors= 0; 1065 int count; 1066 CFAFListIterator iter= absFactors; 1067 CanonicalForm lead= iter.getItem().factor(); 1068 if (iter.getItem().factor().inCoeffDomain()) 1069 { 1070 i++; 1071 iter++; 1072 } 1073 for (; iter.hasItem(); iter++, i++) 1074 { 1075 (**exps)[i]= iter.getItem().exp(); 1076 alpha= iter.getItem().minpoly().mvar(); 1077 if (iter.getItem().minpoly().isOne()) //TODO make sure isOn (SW_RATIONAL) == true 1078 lead /= bCommonDen (iter.getItem().factor()); 1079 else 1080 lead /= power (bCommonDen (iter.getItem().factor()), degree (iter.getItem().minpoly())); 1081 res>m[i]= convFactoryPSingTrP (replacevar (iter.getItem().factor()*bCommonDen (iter.getItem().factor()), alpha, x), r); 1082 if (iter.getItem().minpoly().isOne()) 1083 { 1084 count= iter.getItem().exp(); 1085 mipos>m[i]= convFactoryPSingTrP (x,r); 1086 } 1087 else 1088 { 1089 count= iter.getItem().exp()*degree (iter.getItem().minpoly()); 1090 mipos>m[i]= convFactoryPSingTrP (replacevar (iter.getItem().minpoly(), alpha, x), r); 1091 } 1092 numFactors += count; 1093 } 1094 1095 (**exps)[0]= 1; 1096 res>m[0]= convFactoryPSingTrP (lead, r); 1097 mipos>m[0]= convFactoryPSingTrP (x, r); 1098 return res; 1099 } 1100 #endif 1027 1101 ideal singclap_sqrfree ( poly f, intvec ** v , int with_exps, const ring r) 1028 1102 {
Note: See TracChangeset
for help on using the changeset viewer.