OLD | NEW |
(Empty) | |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #include "components/rappor/rappor_parameters.h" |
| 6 |
| 7 namespace rappor { |
| 8 |
| 9 std::ostream& operator<<(std::ostream& out, const RapporParameters& rhs) { |
| 10 return out |
| 11 << rhs.rappor_name |
| 12 << " " |
| 13 << rhs.bloom_filter_size_bytes |
| 14 << " " |
| 15 << rhs.bloom_filter_hash_function_count |
| 16 << " " |
| 17 << rhs.fake_prob |
| 18 << " " |
| 19 << rhs.fake_one_prob |
| 20 << " " |
| 21 << rhs.one_coin_prob |
| 22 << " " |
| 23 << rhs.zero_coin_prob; |
| 24 } |
| 25 |
| 26 |
| 27 bool operator==(const RapporParameters& lhs, const RapporParameters& rhs) { |
| 28 return lhs.rappor_name == rhs.rappor_name && |
| 29 lhs.bloom_filter_size_bytes == rhs.bloom_filter_size_bytes && |
| 30 lhs.bloom_filter_hash_function_count == |
| 31 rhs.bloom_filter_hash_function_count && |
| 32 lhs.fake_prob == rhs.fake_prob && |
| 33 lhs.fake_one_prob == rhs.fake_one_prob && |
| 34 lhs.one_coin_prob == rhs.one_coin_prob && |
| 35 lhs.zero_coin_prob == rhs.zero_coin_prob; |
| 36 } |
| 37 |
| 38 } // namespace rappor |
OLD | NEW |