MCPcopy Create free account
hub / github.com/Singular/Singular / kStratCopy

Function kStratCopy

kernel/GBEngine/kstdfac.cc:149–233  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

147}
148
149kStrategy kStratCopy(kStrategy o)
150{
151 // int i;
152 kTest_TS(o);
153 kStrategy s=new skStrategy;
154 s->next=NULL;
155 s->red=o->red;
156 s->initEcart=o->initEcart;
157 s->posInT=o->posInT;
158 s->posInL=o->posInL;
159 s->enterS=o->enterS;
160 s->initEcartPair=o->initEcartPair;
161 s->posInLOld=o->posInLOld;
162 s->enterOnePair=o->enterOnePair;
163 s->chainCrit=o->chainCrit;
164 s->Shdl=idCopy(o->Shdl);
165 s->S=s->Shdl->m;
166 s->tailRing = o->tailRing;
167 if (o->D!=NULL) s->D=idCopy(o->D);
168 else s->D=NULL;
169 s->ecartS=(int *)omAlloc(IDELEMS(o->Shdl)*sizeof(int));
170 memcpy(s->ecartS,o->ecartS,IDELEMS(o->Shdl)*sizeof(int));
171 s->sevS=(unsigned long *)omAlloc(IDELEMS(o->Shdl)*sizeof(unsigned long));
172 memcpy(s->sevS,o->sevS,IDELEMS(o->Shdl)*sizeof(unsigned long));
173 s->S_2_R=(int*)omAlloc(IDELEMS(o->Shdl)*sizeof(int));
174 memcpy(s->S_2_R,o->S_2_R,IDELEMS(o->Shdl)*sizeof(int));
175 s->sevT=(unsigned long *)omAlloc(o->tmax*sizeof(unsigned long));
176 memcpy(s->sevT,o->sevT,o->tmax*sizeof(unsigned long));
177 if(o->fromQ!=NULL)
178 {
179 s->fromQ=(int *)omAlloc(IDELEMS(o->Shdl)*sizeof(int));
180 memcpy(s->fromQ,o->fromQ,IDELEMS(o->Shdl)*sizeof(int));
181 }
182 else
183 s->fromQ=NULL;
184 copyT(o,s);//s->T=...
185 s->tail = pInit();
186 copyL(o,s);//s->L=...
187 s->B=initL();
188 s->kNoether=pCopy(o->kNoether);
189 if (o->NotUsedAxis!=NULL)
190 {
191 s->NotUsedAxis=(BOOLEAN *)omAlloc(currRing->N*sizeof(BOOLEAN));
192 memcpy(s->NotUsedAxis,o->NotUsedAxis,currRing->N*sizeof(BOOLEAN));
193 }
194 //s->P=s->L[s->Ll+1];
195 s->P.Init(o->tailRing);
196 s->update=o->update;
197 s->posInLOldFlag=o->posInLOldFlag;
198 s->kModW = o->kModW;
199// if (o->kModW!=NULL)
200// s->kModW=ivCopy(o->kModW);
201// else
202// s->kModW=NULL;
203 s->pairtest=NULL;
204 s->sl=o->sl;
205 s->mu=o->mu;
206 s->tl=o->tl;

Callers 2

completeReduceFacFunction · 0.85
bbafacFunction · 0.85

Calls 6

kTest_TSFunction · 0.85
idCopyFunction · 0.85
copyTFunction · 0.85
copyLFunction · 0.85
initLFunction · 0.85
InitMethod · 0.45

Tested by

no test coverage detected