Lines Matching refs:runs
120 private final List<Long> runs = new ArrayList<Long>();
139 * Adds a sequence x_1, ..., x_n of run lengths to <code>runs</code> such that:<br>
145 * @param X The sum of the sequence that should be added to runs.
153 // add x_1=MIN+1, x_2=MIN, x_3=X-newTotal to runs
156 // add x_1=MIN+1, x_2=MIN, x_3=MIN+2, x_4=X-newTotal to runs
159 // add x_1=MIN+1, x_2=MIN, x_3=MIN+2, x_4=2MIN+2, x_5=X-newTotal to runs
162 // add x_1=MIN+1, x_2=MIN, x_3=MIN+2, x_4=2MIN+2, x_5=3MIN+4, x_6=X-newTotal to runs
165 runs.add(0, X - newTotal);
167 runs.add(0, X);
171 * Fills <code>runs</code> with a sequence of run lengths of the form<br>
179 * X is the sum of all run lengths that will be added to <code>runs</code>.
189 runs.add(0, Y);
191 // X_{i+1} = Y_i + x_{i,1} + 1, since runs.get(1) = x_{i,1}
192 X = Y + runs.get(1) + 1;
203 runs.add(length - runningTotal);
210 for (long len : runs) {