Create an n dimensional index
based on the given interval indices.
Start and end represent the begin and
end of each interval
@param start the start indexes
@param end the end indexes
@return the interval index relative to the given
start and end indices
977071
public static INDArrayIndex[] createFromStartAndEnd(INDArray start, INDArray end) {
        if (start.length() != end.length())
            throw new IllegalArgumentException("Start length must be equal to end length");
        else {
            if (start.length() > Integer.MAX_VALUE)
                throw new ND4JIllegalStateException("Can't proceed with INDArray with length > Integer.MAX_VALUE");

            INDArrayIndex[] indexes = new INDArrayIndex[(int) start.length()];
            for (int i = 0; i < indexes.length; i++) {
                indexes[i] = NDArrayIndex.interval(start.getInt(i), end.getInt(i));
            }
            return indexes;
        }
    }
493928
protected void addRange(int start, int end) {
		this.icaseCache = null;
		// System.err.println("Token#addRange(): "+start+" "+end);
		int r1, r2;
		if (start <= end) {
			r1 = start;
			r2 = end;
		} else {
			r1 = end;
			r2 = start;
		}

		int pos = 0;
		if (this.ranges == null) {
			this.ranges = new int[2];
			this.ranges[0] = r1;
			this.ranges[1] = r2;
			this.setSorted(true);
		} else {
			pos = this.ranges.length;
			if (this.ranges[pos - 1] + 1 == r1) {
				this.ranges[pos - 1] = r2;
				return;
			}
			int[] temp = new int[pos + 2];
			System.arraycopy(this.ranges, 0, temp, 0, pos);
			this.ranges = temp;
			if (this.ranges[pos - 1] >= r1)
				this.setSorted(false);
			this.ranges[pos++] = r1;
			this.ranges[pos] = r2;
			if (!this.sorted)
				this.sortRanges();
		}
	}
306820
public T setRange(float start, float end) {
        this.mStart = start;
        this.mEnd = end;
        updateProgressWidth();
        return self();
    }
928489
public Query range(String start, String end) {
    return range(wrapKey(start), wrapKey(end));
  }
505171
public static ListDouble limit(final ListDouble data, final int start, final int end) {
        return new ListDouble() {

            @Override
            public double getDouble(int index) {
                return data.getDouble(index + start);
            }

            @Override
            public int size() {
                return end - start;
            }
        };
    }
470827
public <T> List<T> range(long start,long end){
    	Set<byte[]> result = null;
        try {    		
        	if(isCluster(groupName)){
        		result = getBinaryJedisClusterCommands(groupName).zrange(keyBytes, start, end);
        	}else{
        		result = getBinaryJedisCommands(groupName).zrange(keyBytes, start, end);
        	}
        	return toObjectList(new ArrayList<>(result));
    	} finally{
			getJedisProvider(groupName).release();
		}
	}
488107
public static RubyRange<Character> range(char start, char end) {
    return new RubyRange<>(CharacterSuccessor.getInstance(), start, end,
        Interval.CLOSED);
  }
91844
public function slice($start_index, $end_index = NULL) {
    if ($start_index < 0) {
      $start_index = $this->count() + $start_index;
    }
    if ($end_index < 0) {
      $end_index = $this->count() + $end_index;
    }
    $last_index = $this->count() - 1;
    if ($start_index > $last_index) {
      $start_index = $last_index;
    }
    if ($end_index !== NULL) {
      if ($end_index > $last_index) {
        $end_index = $last_index;
      }
      if ($start_index > $end_index) {
        $start_index = $end_index;
      }
      $length = $end_index - $start_index;
    }
    else {
      $length = $this->count() - $start_index;
    }
    return new NodeCollection(array_slice($this->nodes, $start_index, $length));
  }
115062
def _get_start_end(parts, index=7):
    
    start = parts[1]
    end = [x.split("=")[-1] for x in parts[index].split(";") if x.startswith("END=")]
    if end:
        end = end[0]
        return start, end
    return None, None
178997
public static int[] sequence(int start, int end) {
    if(start >= end) {
      return EMPTY_INTS;
    }
    int[] ret = new int[end - start];
    for(int j = 0; start < end; start++, j++) {
      ret[j] = start;
    }
    return ret;
  }
611915
public PointList copy(int from, int end) {
        if (from > end)
            throw new IllegalArgumentException("from must be smaller or equal to end");
        if (from < 0 || end > getSize())
            throw new IllegalArgumentException("Illegal interval: " + from + ", " + end + ", size:" + getSize());


        PointList thisPL = this;
        if (this instanceof ShallowImmutablePointList) {
            ShallowImmutablePointList spl = (ShallowImmutablePointList) this;
            thisPL = spl.wrappedPointList;
            from = spl.fromOffset + from;
            end = spl.fromOffset + end;
        }

        int len = end - from;
        PointList copyPL = new PointList(len, is3D());
        copyPL.size = len;
        copyPL.isImmutable = isImmutable();
        System.arraycopy(thisPL.latitudes, from, copyPL.latitudes, 0, len);
        System.arraycopy(thisPL.longitudes, from, copyPL.longitudes, 0, len);
        if (is3D())
            System.arraycopy(thisPL.elevations, from, copyPL.elevations, 0, len);
        return copyPL;
    }
658379
public static Protos.Value.Range range(long begin, long end) {
		return Protos.Value.Range.newBuilder().setBegin(begin).setEnd(end).build();
	}
92475
public static INDArrayIndex interval(long begin, long stride, long end,long max) {
        if(begin < 0) {
            begin += max;
        }

        if(end < 0) {
            end += max;
        }

        if (Math.abs(begin - end) < 1)
            end++;
        if (stride > 1 && Math.abs(begin - end) == 1) {
            end *= stride;
        }
        return interval(begin, stride, end, false);
    }
258125
public static long factorial(long start, long end) {
		if (start < end) {
			return 0L;
		}
		if (start == end) {
			return 1L;
		}
		return start * factorial(start - 1, end);
	}
250868
public static ArrayList<Point2> getPoints(int startX, int startY, int endX, int endY) {
    final ArrayList<Point2> result = new ArrayList<Point2>();
    for (int y = startY; y < endY; y++) {
      for (int x = startX; x < endX; x++) {
        result.add(new Point2(x, y));
      }
    }
    return result;
  }
273175
public function getChildrenBetweenIndexes(int $start, int $end)
    {
        return array_slice($this->children, $start, $end - $start + 1);
    }
1010670
public StrBuilder insert(int index, CharSequence csq, int start, int end) {
		if (csq == null) {
			csq = "null";
		}
		final int csqLen = csq.length();
		if (start > csqLen) {
			return this;
		}
		if (start < 0) {
			start = 0;
		}
		if (end > csqLen) {
			end = csqLen;
		}
		if (start >= end) {
			return this;
		}
		if (index < 0) {
			index = 0;
		}

		final int length = end - start;
		moveDataAfterIndex(index, length);
		for (int i = start, j = this.position; i < end; i++, j++) {
			value[j] = csq.charAt(i);
		}
		this.position = Math.max(this.position, index) + length;
		return this;
	}