Returns a list that represents [start,end).

For example sequence(1,5,1)={1,2,3,4}, and sequence(7,1,-2)={7.5,3}

@since 1.150
775528
public static List<Integer> sequence(final int start, int end, final int step) {

        final int size = (end-start)/step;
        if(size<0)  throw new IllegalArgumentException("List size is negative");

        return new AbstractList<Integer>() {
            public Integer get(int index) {
                if(index<0 || index>=size)
                    throw new IndexOutOfBoundsException();
                return start+index*step;
            }

            public int size() {
                return size;
            }
        };
    }
541627
def lis(seq, indices=False):
    '''
    '''
    if not seq:
        return []
    # prevs[i] is the index of the previous element in the longest subsequence
    # containing element i
    prevs = [None] * len(seq)
    # tails[i] is the pair (elem, index) of the lowest element of any
    # subsequence with length i + 1
    tails = [(seq[0], 0)]
    for i, elem in enumerate(seq[1:], start=1):
        if elem > tails[-1][0]:
            prevs[i] = tails[-1][1]
            tails.append((elem, i))
            continue
        # let's find a tail that we can extend
        k = bisect(tails, (elem, -1))
        if tails[k][0] > elem:
            tails[k] = (elem, i)
            if k > 0:
                prevs[i] = tails[k - 1][1]
    _, i = tails[-1]
    subseq = []
    while i is not None:
        subseq.append(i if indices else seq[i])
        i = prevs[i]
    return subseq[::-1]
940591
def slice_by_coord( self, start, end ):
        
        start_col = self.coord_to_col( start )
        end_col = self.coord_to_col( end )
        if (self.strand == '-'):
            (start_col,end_col) = (end_col,start_col)
        return self.slice( start_col, end_col )
1258598
public List<String> range(int start,int end){
        try {    		
        	return new ArrayList<>(getJedisCommands(groupName).zrange(key, start, end));
    	} finally{
			getJedisProvider(groupName).release();
		}
	}
154834
function(start, end){
        //subQueue to Array
        if(start >= 0 && start < end && end <= this._length) {
            var result = [],
                current = this._head,
                i = 0;
            while(i++ < start) {
                current = current.next;
            }

            while(start++ < end) {
                var value = current.data.value;
                if(value != null) {
                    result.push(current.data.value);
                }
                current = current.next;
            }

            return result;
        }

        var result = [],
            current = this._head;
        
        while(current){
            result.push(current.data);
            current = current.next;
        }
        
        return result;
    }
64790
public String sequence() {
    return dN == asg.length() ? null : substr(asg, dN + 1, asg.length());
  }
686611
public List<Entry> getEntries(int start, int count) {
        List<Entry> result = Lists.newArrayList();
        int index = start;
        int itemsToReturn = count;
        synchronized (entries) {
            Iterator<Entry> iter = entries.iterator();
            while (iter.hasNext() && index > 0) {
                iter.next();
                index--;
            }
            while (iter.hasNext() && itemsToReturn > 0) {
                result.add(iter.next());
                itemsToReturn--;
            }
        }

        return result;
    }
459280
public function subSequence(int $start, int $end) {
        $arrayList = $this->arrayList->subList($start, $end);
        $stringBuilder = $this->arrayListToStringBuilder($arrayList);
        return $stringBuilder;
    }
545865
def range(self, start, end, desc=False):
        
        if not self:
            return []

        if desc:
            return reversed(self._scores[len(self) - end - 1:len(self) - start])
        else:
            return self._scores[start:end + 1]
1000542
def slice_sequence(self,start,end):
     
     #find the sequence length
     l = self.length
     indexstart = start
     indexend = end
     ns = []
     tot = 0
     for r in self._rngs:
        tot += r.length
        n = r.copy()
        if indexstart > r.length:  
           indexstart-=r.length
           continue
        n.start = n.start+indexstart
        if tot > end: 
           diff = tot-end
           n.end -= diff
           tot = end
        indexstart = 0
        ns.append(n)
        if tot == end: break
     if len(ns)==0: return None
     return MappingGeneric(ns,self._options)
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;
        }
    }
213123
public IntStream getAllOccurrencesAsRanges() {
        IntStream result = IntStream.empty();
        // with/or without end
        for (int i = start; i < end; i++) {
            // every i is one occurrence
            int token_position = tokenIndex.suffix_array[i];
            IntStream range = IntStream.range(token_position, token_position + length);
            result = IntStream.concat(result, range);
        }
        return result;
    }
224696
public List<T> last(final int n) {
        N.checkArgument(n >= 0, "'n' can't be negative: " + n);

        if (N.isNullOrEmpty(coll) || n == 0) {
            return new ArrayList<>();
        } else if (coll.size() <= n) {
            return new ArrayList<>(coll);
        } else if (coll instanceof List) {
            return new ArrayList<>(((List<T>) coll).subList(coll.size() - n, coll.size()));
        } else {
            final List<T> result = new ArrayList<>(N.min(n, coll.size()));
            final Iterator<T> iter = coll.iterator();
            int offset = coll.size() - n;

            while (offset-- > 0) {
                iter.next();
            }

            while (iter.hasNext()) {
                result.add(iter.next());
            }

            return result;
        }
    }
239260
public static Map<FastaSequence,Range[]> getDisorder(List<FastaSequence> sequences) {
		Map<FastaSequence,Range[]> disorderRanges = new TreeMap<FastaSequence,Range[]>();
		for(FastaSequence fs: sequences) {
			disorderRanges.put(fs, getDisorder(fs));
		}
		return disorderRanges;
	}
1073167
def sequence(self):
        '''
        
        '''
        if (len(self.Points[0]) == 2):
            if (self.Sort == 'X' or self.Sort == 'x'):
                self.Points.sort(key=lambda x: x[0])
                self.order(self.Points)

            elif (self.Sort == 'Y' or self.Sort == 'y'):
                self.Points.sort(key=lambda x: x[1])
                self.order(self.Points)
            else:
                self.order(self.Points)

        if (len(self.Points[0]) == 3):
            if (self.Sort == 'X' or self.Sort == 'x'):
                self.Points.sort(key=lambda x: x[0])
                self.order(self.Points)

            elif (self.Sort == 'Y' or self.Sort == 'y'):
                self.Points.sort(key=lambda x: x[1])
                self.order(self.Points)
            elif (self.Sort == 'Z' or self.Sort == 'Z'):
                self.Points.sort(key=lambda x: x[2])
                self.order(self.Points)
            else:
                self.order(self.Points)
1221436
def subseq(start_offset=0, end_offset=None):
    
    def _(sequence):
        return sequence.subseq(start_offset, end_offset)
    return _
674549
public int sizeInSequence() {
        int sequence = 0;
        if (m_map.isEmpty()) {
            return sequence;
        }
        final Iterator<Range<Long>> iter = m_map.asRanges().iterator();
        while (iter.hasNext()) {
            Range<Long> range = iter.next();
            sequence += end(range) - start(range) + 1;
        }
        if (m_hasSentinel) {
            sequence -= 1;
        }
        return sequence;
    }