| OLD | NEW |
| 1 // Copyright (c) 2006-2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 // Remember a subset of a sequence of values, using a modest amount of memory | 5 // Remember a subset of a sequence of values, using a modest amount of memory |
| 6 | 6 |
| 7 /*** | 7 /*** |
| 8 Design: | 8 Design: |
| 9 Accumulate in powers of three, using 3-way median to collapse entries. | 9 Accumulate in powers of three, using 3-way median to collapse entries. |
| 10 At any given time, there is one most-dense (highest power of 3) range of | 10 At any given time, there is one most-dense (highest power of 3) range of |
| 11 entries and a series of less-dense ranges that hold 0..2 entries each. There | 11 entries and a series of less-dense ranges that hold 0..2 entries each. There |
| (...skipping 238 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 250 } else { | 250 } else { |
| 251 dst[j] = seq_[i]; | 251 dst[j] = seq_[i]; |
| 252 } | 252 } |
| 253 ++j; | 253 ++j; |
| 254 err += from_n; | 254 err += from_n; |
| 255 } | 255 } |
| 256 } | 256 } |
| 257 } | 257 } |
| 258 | 258 |
| 259 } | 259 } |
| OLD | NEW |