Changeset 955025 in git
- Timestamp:
- Nov 27, 2006, 2:44:44 PM (17 years ago)
- Branches:
- (u'spielwiese', '91fdef05f09f54b8d58d92a472e9c4a43aa4656f')
- Children:
- b2c236a6179ecdae1034b600ce9d1490f7eca0f9
- Parents:
- 1eaa1dc3ce472107c471d84ea116e5ad1fede744
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/ideals.cc
r1eaa1d r955025 2 2 * Computer Algebra System SINGULAR * 3 3 ****************************************/ 4 /* $Id: ideals.cc,v 1.2 6 2006-11-27 12:55:57Singular Exp $ */4 /* $Id: ideals.cc,v 1.27 2006-11-27 13:44:44 Singular Exp $ */ 5 5 /* 6 6 * ABSTRACT - all basic methods to manipulate ideals … … 3535 3535 } 3536 3536 3537 #if 0 3537 3538 static void idDeleteComp(ideal arg,int red_comp) 3538 3539 { … … 3555 3556 } 3556 3557 (arg->rank)--; 3558 } 3559 #endif 3560 3561 static void idDeleteComps(ideal arg,int* red_comp,int del) 3562 // red_comp is an array [0..args->rank] 3563 { 3564 int i,j; 3565 poly p; 3566 3567 for (i=IDELEMS(arg)-1;i>=0;i--) 3568 { 3569 p = arg->m[i]; 3570 while (p!=NULL) 3571 { 3572 j = pGetComp(p); 3573 if (red_comp[j]!=j) 3574 { 3575 pSetComp(p,red_comp[j]); 3576 pSetmComp(p); 3577 } 3578 pIter(p); 3579 } 3580 } 3581 (arg->rank) -= del; 3557 3582 } 3558 3583 … … 3569 3594 if (!inPlace) res = idCopy(arg); 3570 3595 res->rank=si_max(res->rank,idRankFreeModule(res)); 3596 int *red_comp=(int*)omAlloc((res->rank+1)*sizeof(int)); 3597 for (i=res->rank;i>=0;i--) red_comp[i]=i; 3571 3598 3572 3599 int del=0; … … 3577 3604 del++; 3578 3605 syGaussForOne(res,next_gen,next_comp,0,IDELEMS(res)); 3579 idDeleteComp(res,next_comp);3606 for(i=next_comp+1;i<=arg->rank;i++) red_comp[i]--; 3580 3607 if ((w !=NULL)&&(*w!=NULL)) 3581 3608 { … … 3583 3610 } 3584 3611 } 3612 3613 idDeleteComps(res,red_comp,del); 3614 idSkipZeroes(res); 3615 omFree(red_comp); 3616 3585 3617 if ((w !=NULL)&&(*w!=NULL) &&(del>0)) 3586 3618 { … … 3590 3622 *w=wtmp; 3591 3623 } 3592 idSkipZeroes(res);3593 3624 return res; 3594 3625 }
Note: See TracChangeset
for help on using the changeset viewer.