Lines Matching refs:step
207 slice_adjust(Difference i, Difference j, Py_ssize_t step, size_t size, Difference &ii, Difference &jj, bool insert = false) {
208 if (step == 0) {
209 throw std::invalid_argument("slice step cannot be zero");
210 } else if (step > 0) {
259 getslice(const Sequence* self, Difference i, Difference j, Py_ssize_t step) {
263 swig::slice_adjust(i, j, step, size, ii, jj);
265 if (step > 0) {
270 if (step == 1) {
277 for (Py_ssize_t c=0; c<step && it!=se; ++c)
292 for (Py_ssize_t c=0; c<-step && it!=se; ++c)
302 setslice(Sequence* self, Difference i, Difference j, Py_ssize_t step, const InputSeq& is = InputSeq()) {
306 swig::slice_adjust(i, j, step, size, ii, jj, true);
307 if (step > 0) {
310 if (step == 1) {
331 size_t replacecount = (jj - ii + step - 1) / step;
342 for (Py_ssize_t c=0; c<(step-1) && it != self->end(); ++c)
349 size_t replacecount = (ii - jj - step - 1) / -step;
360 for (Py_ssize_t c=0; c<(-step-1) && it != self->rend(); ++c)
368 delslice(Sequence* self, Difference i, Difference j, Py_ssize_t step) {
372 swig::slice_adjust(i, j, step, size, ii, jj, true);
373 if (step > 0) {
377 if (step == 1) {
383 size_t delcount = (jj - ii + step - 1) / step;
386 for (Py_ssize_t c=0; c<(step-1) && it != self->end(); ++c)
397 size_t delcount = (ii - jj - step - 1) / -step;
400 for (Py_ssize_t c=0; c<(-step-1) && it != self->rend(); ++c)
816 Py_ssize_t i, j, step;
821 PySlice_GetIndices(SWIGPY_SLICE_ARG(slice), (Py_ssize_t)self->size(), &i, &j, &step);
824 return swig::getslice(self, id, jd, step);
828 Py_ssize_t i, j, step;
833 PySlice_GetIndices(SWIGPY_SLICE_ARG(slice), (Py_ssize_t)self->size(), &i, &j, &step);
836 swig::setslice(self, id, jd, step, v);
840 Py_ssize_t i, j, step;
845 PySlice_GetIndices(SWIGPY_SLICE_ARG(slice), (Py_ssize_t)self->size(), &i, &j, &step);
848 swig::delslice(self, id, jd, step);
852 Py_ssize_t i, j, step;
857 PySlice_GetIndices(SWIGPY_SLICE_ARG(slice), (Py_ssize_t)self->size(), &i, &j, &step);
860 swig::delslice(self, id, jd, step);