sciquence.sequences.mslc

sciquence.sequences.mslc()

Given a length n real sequence, finds the consecutive subsequence of length at most U with the maximum sum in O(n) time.

Parameters:
  • A (list of float) – List of float numbers
  • U (int) – Sum upper bound
Returns:

ln_pointers – List of left-negative pointers

Return type:

list of int

References

Lin Y.L., Jiang T., Chaoc K.M. (2002).

Efficient algorithms for locating the length-constrained heaviest segments with applications to biomolecular sequence analysis

http://www.csie.ntu.edu.tw/~kmchao/papers/2002_jcss.pdf