Changeset 3504d7 in git
- Timestamp:
- Nov 24, 2006, 2:44:38 PM (17 years ago)
- Branches:
- (u'jengelh-datetime', 'ceac47cbc86fe4a15902392bdbb9bd2ae0ea02c6')(u'spielwiese', '0604212ebb110535022efecad887940825b97c3f')
- Children:
- 1d138cc219f68b925aa7c15df754cc1eaf1da469
- Parents:
- 0ef842f27dd9647ae9abc8375147f2c17ec4e0c8
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/ideals.cc
r0ef842 r3504d7 2 2 * Computer Algebra System SINGULAR * 3 3 ****************************************/ 4 /* $Id: ideals.cc,v 1.2 3 2006-11-24 09:53:01Singular Exp $ */4 /* $Id: ideals.cc,v 1.24 2006-11-24 13:44:38 Singular Exp $ */ 5 5 /* 6 6 * ABSTRACT - all basic methods to manipulate ideals … … 3485 3485 static int idReadOutUnits(ideal arg,int* comp) 3486 3486 { 3487 if (idIs0(arg)) return -1;3487 assume(!idIs0(arg)); 3488 3488 int i=0,j, generator=-1; 3489 3489 int rk_arg=arg->rank; //idRankFreeModule(arg); … … 3564 3564 { 3565 3565 if (idIs0(arg)) return idInit(1,arg->rank); 3566 int next_gen,next_comp;3566 int i,next_gen,next_comp; 3567 3567 ideal res=arg; 3568 3568 … … 3570 3570 res->rank=si_max(res->rank,idRankFreeModule(res)); 3571 3571 3572 intvec *wtmp=NULL; 3572 3573 loop 3573 3574 { … … 3578 3579 if ((w !=NULL)&&(*w!=NULL)) 3579 3580 { 3580 intvec *wtmp; 3581 if ((*w)->length()==1) 3582 { 3583 wtmp=new intvec(1); 3584 // (*wtmp)[0]=0; 3585 } 3586 else 3587 { 3588 wtmp=new intvec((*w)->length()-1); 3589 int i; 3590 for(i=0;i<next_comp-1;i++) (*wtmp)[i]=(**w)[i]; 3591 for(i=next_comp;i<(*w)->length();i++) (*wtmp)[i-1]=(**w)[i]; 3592 } 3581 if (wtmp==NULL) 3582 { 3583 if ((*w)->length()==1) 3584 { 3585 wtmp=new intvec(1); 3586 // (*wtmp)[0]=0; 3587 } 3588 else 3589 { 3590 wtmp=new intvec((*w)->length()-1); 3591 for(i=0;i<wtmp->length();i++) (*wtmp)[i]=(**w)[i]; 3592 } 3593 } 3594 for(i=next_comp;i<(*w)->length();i++) (*wtmp)[i-1]=(*wtmp)[i]; 3595 } 3596 } 3597 if ((w !=NULL)&&(*w!=NULL)) 3598 { 3599 delete *w; 3600 *w=wtmp; 3601 if (wtmp->length()>1) 3602 { 3603 wtmp=new intvec(res->rank); 3604 for(i=0;i<res->rank;i++) (*wtmp)[i]=(**w)[i]; 3593 3605 delete *w; 3594 3606 *w=wtmp;
Note: See TracChangeset
for help on using the changeset viewer.