| OLD | NEW |
| 1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
| 2 <!-- | 2 <!-- |
| 3 Copyright (c) 2014 The Chromium Authors. All rights reserved. | 3 Copyright (c) 2014 The Chromium Authors. All rights reserved. |
| 4 Use of this source code is governed by a BSD-style license that can be | 4 Use of this source code is governed by a BSD-style license that can be |
| 5 found in the LICENSE file. | 5 found in the LICENSE file. |
| 6 --> | 6 --> |
| 7 <link rel="import" href="/tracing/base/base.html"> | 7 <link rel="import" href="/tracing/base/base.html"> |
| 8 <script> | 8 <script> |
| 9 'use strict'; | 9 'use strict'; |
| 10 | 10 |
| 11 /** | 11 /** |
| 12 * @fileoverview Helper functions for doing intersections and iteration | 12 * @fileoverview Helper functions for doing intersections and iteration |
| 13 * over sorted arrays and intervals. | 13 * over sorted arrays and intervals. |
| 14 * | 14 * |
| 15 */ | 15 */ |
| 16 tr.exportTo('tr.b', function() { | 16 tr.exportTo('tr.b.math', function() { |
| 17 /** | 17 /** |
| 18 * Finds the first index in the array whose value is >= loVal. | 18 * Finds the first index in the array whose value is >= loVal. |
| 19 * | 19 * |
| 20 * The key for the search is defined by the mapFn. This array must | 20 * The key for the search is defined by the mapFn. This array must |
| 21 * be prearranged such that ary.map(mapFn) would also be sorted in | 21 * be prearranged such that ary.map(mapFn) would also be sorted in |
| 22 * ascending order. | 22 * ascending order. |
| 23 * | 23 * |
| 24 * @param {Array} ary An array of arbitrary objects. | 24 * @param {Array} ary An array of arbitrary objects. |
| 25 * @param {function():*} mapFn Callback that produces a key value | 25 * @param {function():*} mapFn Callback that produces a key value |
| 26 * from an element in ary. | 26 * from an element in ary. |
| (...skipping 295 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 322 findHighIndexInSortedArray, | 322 findHighIndexInSortedArray, |
| 323 findIndexInSortedIntervals, | 323 findIndexInSortedIntervals, |
| 324 findIndexInSortedClosedIntervals, | 324 findIndexInSortedClosedIntervals, |
| 325 iterateOverIntersectingIntervals, | 325 iterateOverIntersectingIntervals, |
| 326 getIntersectingIntervals, | 326 getIntersectingIntervals, |
| 327 findClosestElementInSortedArray, | 327 findClosestElementInSortedArray, |
| 328 findClosestIntervalInSortedIntervals, | 328 findClosestIntervalInSortedIntervals, |
| 329 }; | 329 }; |
| 330 }); | 330 }); |
| 331 </script> | 331 </script> |
| OLD | NEW |