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

Function ivAddShift

libpolys/misc/intvec.cc:279–295  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

277}
278
279intvec * ivAddShift(intvec * a, intvec * b, int s)
280{
281 if (a->cols() != b->cols()) return NULL;
282 if (a->cols() == 1)
283 {
284 int i;
285 intvec * iv;
286 int ma = si_max(a->rows(),b->rows()+s);
287 iv=new intvec(ma);
288 for (i=a->rows()-1;i>=0;i--)
289 (*iv)[i] = (*a)[i];
290 for(i=b->rows()+s-1;i>=s;i--)
291 (*iv)[i] += (*b)[i-s];
292 return iv;
293 }
294 return NULL;
295}
296
297intvec * ivSub(intvec * a, intvec * b)
298{

Callers 1

hFirstSeriesFunction · 0.85

Calls 3

si_maxFunction · 0.85
colsMethod · 0.80
rowsMethod · 0.80

Tested by

no test coverage detected