Changeset f50eb2 in git
- Timestamp:
- Jun 8, 2020, 6:26:41 PM (3 years ago)
- Branches:
- (u'spielwiese', '8d54773d6c9e2f1d2593a28bc68b7eeab54ed529')
- Children:
- 8b7ebfed239b67853aad0eec6fc2f727b9ec55d5ab7174f97f3aaf313466647c215f8a4bf78bcdaa
- Parents:
- fdda5465265805b57a9c0f85de0debd58cd07bee
- git-author:
- Hans Schoenemann <hannes@mathematik.uni-kl.de>2020-06-08 18:26:41+02:00
- git-committer:
- Hans Schoenemann <hannes@mathematik.uni-kl.de>2020-06-08 18:30:54+02:00
- Location:
- Singular
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
Singular/ipassign.cc
rfdda546 rf50eb2 171 171 } 172 172 } 173 ring jjSetMinpoly(ring r, number a, BOOLEAN modify) 174 { 175 if( !nCoeff_is_transExt(r->cf) && (r->idroot == NULL) && n_IsZero(a, r->cf) ) 176 { 177 return r; 178 } 179 180 173 ring jjSetMinpoly(ring r, number a) 174 { 181 175 if ( !nCoeff_is_transExt(r->cf) ) 182 176 { … … 187 181 } 188 182 } 189 if ((rVar(r->cf->extRing)!=1) 190 && !n_IsZero(a, r->cf) ) 183 if (rVar(r->cf->extRing)!=1) 191 184 { 192 185 WerrorS("only univarite minpoly allowed"); … … 194 187 } 195 188 196 BOOLEAN redefine_from_algext=FALSE; 197 if ( r->idroot != NULL ) 198 { 199 redefine_from_algext=(r->cf->extRing->qideal!=NULL); 200 } 201 202 // assume (r->idroot==NULL); 189 assume (r->idroot==NULL); 203 190 204 191 number p = n_Copy(a,r->cf); … … 215 202 return NULL; 216 203 } 217 if (!modify)r=rCopy(r);204 r=rCopy(r); 218 205 // remove all object currently in the ring 219 while(r->idroot!=NULL)220 {221 #ifndef SING_NDEBUG222 Warn("killing a local object due to minpoly change: %s", IDID(r->idroot));223 #endif224 killhdl2(r->idroot,&(r->idroot),r);225 }226 206 227 207 AlgExtInfo A; … … 236 216 // cleanup A: TODO 237 217 rDelete( A.r ); 238 if (!modify)rDelete(r);218 rDelete(r); 239 219 return NULL; 240 220 } 241 if ( !redefine_from_algext && (DEN((fraction)(p)) != NULL)) // minpoly must be a fraction with poly numerator...!!221 if (DEN((fraction)(p)) != NULL) // minpoly must be a fraction with poly numerator...!! 242 222 { 243 223 poly n=DEN((fraction)(p)); … … 250 230 } 251 231 252 if (redefine_from_algext) q->m[0]=(poly)p; 253 else q->m[0] = NUM((fraction)p); 232 q->m[0] = NUM((fraction)p); 254 233 A.r->qideal = q; 255 234 256 if (!redefine_from_algext) 257 { 258 EXTERN_VAR omBin fractionObjectBin; 259 NUM((fractionObject *)p) = NULL; // not necessary, but still... 260 omFreeBin((ADDRESS)p, fractionObjectBin); 261 } 235 EXTERN_VAR omBin fractionObjectBin; 236 NUM((fractionObject *)p) = NULL; // not necessary, but still... 237 omFreeBin((ADDRESS)p, fractionObjectBin); 262 238 263 239 coeffs new_cf = nInitChar(n_algExt, &A); … … 267 243 // cleanup A: TODO 268 244 rDelete( A.r ); 269 if (!modify)rDelete(r);245 rDelete(r); 270 246 return NULL; 271 247 } -
Singular/ipshell.h
rfdda546 rf50eb2 171 171 /* Assigments : */ 172 172 BOOLEAN iiAssign(leftv left, leftv right, BOOLEAN toplevel=TRUE); 173 ring jjSetMinpoly(ring r, number a , BOOLEAN modify);173 ring jjSetMinpoly(ring r, number a); 174 174 175 175 typedef BOOLEAN (*proci)(leftv,leftv,Subexpr);
Note: See TracChangeset
for help on using the changeset viewer.