Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(490)

Side by Side Diff: tracing/tracing/base/math/statistics_test.html

Issue 2771723003: [tracing] Move math utilities from base into their own subdirectory (attempt 2) (Closed)
Patch Set: rebase Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « tracing/tracing/base/math/statistics.html ('k') | tracing/tracing/base/math_test.html » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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/statistics.html"> 7 <link rel="import" href="/tracing/base/math/statistics.html">
8 <script> 8 <script>
9 'use strict'; 9 'use strict';
10 10
11 // TODO(charliea): Remove: 11 // TODO(charliea): Remove:
12 /* eslint-disable catapult-camelcase */ 12 /* eslint-disable catapult-camelcase */
13 13
14 tr.b.unittest.testSuite(function() { 14 tr.b.unittest.testSuite(function() {
15 var Statistics = tr.b.Statistics; 15 var Statistics = tr.b.math.Statistics;
16 16
17 /** 17 /**
18 * Lloyd relaxation in 1D. 18 * Lloyd relaxation in 1D.
19 * 19 *
20 * Keeps the position of the first and last sample. 20 * Keeps the position of the first and last sample.
21 **/ 21 **/
22 function relax(samples, opt_iterations) { 22 function relax(samples, opt_iterations) {
23 opt_iterations = opt_iterations || 10; 23 opt_iterations = opt_iterations || 10;
24 for (var i = 0; i < opt_iterations; i++) { 24 for (var i = 0; i < opt_iterations; i++) {
25 var voronoiBoundaries = []; 25 var voronoiBoundaries = [];
(...skipping 542 matching lines...) Expand 10 before | Expand all | Expand 10 after
568 assert(isNaN(results.p)); 568 assert(isNaN(results.p));
569 569
570 // The result of comparing a sample against an empty sample should not be a 570 // The result of comparing a sample against an empty sample should not be a
571 // valid p value. NOTE: The current implementation returns 0, it is up to 571 // valid p value. NOTE: The current implementation returns 0, it is up to
572 // the caller to interpret this. 572 // the caller to interpret this.
573 results = Statistics.mwu(normallyDistributedSample, emptySample); 573 results = Statistics.mwu(normallyDistributedSample, emptySample);
574 assert(!results.p); 574 assert(!results.p);
575 }); 575 });
576 }); 576 });
577 </script> 577 </script>
OLDNEW
« no previous file with comments | « tracing/tracing/base/math/statistics.html ('k') | tracing/tracing/base/math_test.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698