Changeset ce7a6ad in git
- Timestamp:
- Jan 20, 2002, 10:20:19 AM (22 years ago)
- Branches:
- (u'spielwiese', 'fe61d9c35bf7c61f2b6cbf1b56e25e2f08d536cc')
- Children:
- b8490e74a539f406ed4238becdea28121774e338
- Parents:
- 959ad237d1cd4759153762c28484900baf52ec96
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
Singular/clapsing.cc
r959ad23 rce7a6ad 3 3 * Computer Algebra System SINGULAR * 4 4 ****************************************/ 5 // $Id: clapsing.cc,v 1.7 8 2001-08-27 14:46:49 Singular Exp $5 // $Id: clapsing.cc,v 1.79 2002-01-20 09:20:19 Singular Exp $ 6 6 /* 7 7 * ABSTRACT: interface between Singular and factory … … 23 23 #ifdef HAVE_LIBFAC_P 24 24 #include <factor.h> 25 CanonicalForm algcd(const CanonicalForm & F, const CanonicalForm & g, const CFList & as, const Varlist & order); 26 25 27 #endif 26 28 #include "ring.h" … … 206 208 if (f==NULL) return pCopy(g); // f==0 => gcd=g (but do a pCleardenom) 207 209 210 if (pIsConstant(f) || pIsConstant(g)) return pOne(); 211 208 212 // for now there is only the possibility to handle polynomials over 209 213 // Q and Fp ... … … 226 230 if ( nGetChar()==1 ) /* Q(a) */ 227 231 { 228 WerrorS( feNotImplemented ); 232 // WerrorS( feNotImplemented ); 233 CanonicalForm mipo=convSingTrClapP(((lnumber)currRing->minpoly)->z); 234 Varlist ord; 235 ord.append(mipo.mvar()); 236 CFList as(mipo); 237 Variable a=rootOf(mipo); 238 CanonicalForm F( convSingAPClapAP( f,a ) ), G( convSingAPClapAP( g,a ) ); 239 res= convClapAPSingAP( algcd( F, G, as, ord) ); 229 240 } 230 241 else … … 1046 1057 loop 1047 1058 { 1059 BOOLEAN done=TRUE; 1048 1060 i=Li.getItem()-1; 1049 1061 mark[i]=1; 1050 1062 if (i<offs) 1051 1063 { 1052 StringAppendS(currRing->parameter[i]); 1064 done=FALSE; 1065 //StringAppendS(currRing->parameter[i]); 1053 1066 } 1054 1067 else … … 1059 1072 cnt--; 1060 1073 if(cnt==0) break; 1061 StringAppendS(",");1074 if (done) StringAppendS(","); 1062 1075 if(! Li.hasItem()) break; 1063 1076 } 1064 1077 for(i=0;i<pVariables+offs;i++) 1065 1078 { 1079 BOOLEAN done=TRUE; 1066 1080 if(mark[i]==0) 1067 1081 { 1068 1082 if (i<offs) 1069 1083 { 1070 StringAppendS(currRing->parameter[i]); 1084 done=FALSE; 1085 //StringAppendS(currRing->parameter[i]); 1071 1086 } 1072 1087 else … … 1076 1091 cnt--; 1077 1092 if(cnt==0) break; 1078 StringAppendS(","); 1079 } 1080 } 1081 return omStrDup(StringAppendS("")); 1093 if (done) StringAppendS(","); 1094 } 1095 } 1096 char * s=omStrDup(StringAppendS("")); 1097 if (s[strlen(s)-1]==',') s[strlen(s)-1]='\0'; 1098 return s; 1082 1099 #else 1083 1100 return NULL;
Note: See TracChangeset
for help on using the changeset viewer.