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

Side by Side Diff: courgette/difference_estimator.cc

Issue 16667019: Rename base/hash_tables to base/containers/hash_tables. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 6 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 | Annotate | Revision Log
« no previous file with comments | « content/zygote/zygote_main_linux.cc ('k') | device/bluetooth/bluetooth_adapter_mac.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2009 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 // We want to measure the similarity of two sequences of bytes as a surrogate 5 // We want to measure the similarity of two sequences of bytes as a surrogate
6 // for measuring how well a second sequence will compress differentially to the 6 // for measuring how well a second sequence will compress differentially to the
7 // first sequence. 7 // first sequence.
8 8
9 #include "courgette/difference_estimator.h" 9 #include "courgette/difference_estimator.h"
10 10
11 #include "base/hash_tables.h" 11 #include "base/containers/hash_tables.h"
12 12
13 namespace courgette { 13 namespace courgette {
14 14
15 // Our difference measure is the number of k-tuples that occur in Subject that 15 // Our difference measure is the number of k-tuples that occur in Subject that
16 // don't occur in Base. 16 // don't occur in Base.
17 const int kTupleSize = 4; 17 const int kTupleSize = 4;
18 18
19 namespace { 19 namespace {
20 20
21 COMPILE_ASSERT(kTupleSize >= 4 && kTupleSize <= 8, kTupleSize_between_4_and_8); 21 COMPILE_ASSERT(kTupleSize >= 4 && kTupleSize <= 8, kTupleSize_between_4_and_8);
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
109 109
110 if (mismatches == 0) { 110 if (mismatches == 0) {
111 if (RegionsEqual(base->region(), subject->region())) 111 if (RegionsEqual(base->region(), subject->region()))
112 return 0; 112 return 0;
113 } 113 }
114 ++mismatches; // Guarantee not zero. 114 ++mismatches; // Guarantee not zero.
115 return mismatches; 115 return mismatches;
116 } 116 }
117 117
118 } // namespace 118 } // namespace
OLDNEW
« no previous file with comments | « content/zygote/zygote_main_linux.cc ('k') | device/bluetooth/bluetooth_adapter_mac.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698