| 277 | } |
| 278 | |
| 279 | intvec * 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 | |
| 297 | intvec * ivSub(intvec * a, intvec * b) |
| 298 | { |
no test coverage detected