diff options
Diffstat (limited to 'src/set/gnunet-service-set_union_strata_estimator.h')
-rw-r--r-- | src/set/gnunet-service-set_union_strata_estimator.h | 41 |
1 files changed, 20 insertions, 21 deletions
diff --git a/src/set/gnunet-service-set_union_strata_estimator.h b/src/set/gnunet-service-set_union_strata_estimator.h index 99f16f20a..2c09e1089 100644 --- a/src/set/gnunet-service-set_union_strata_estimator.h +++ b/src/set/gnunet-service-set_union_strata_estimator.h | |||
@@ -11,12 +11,12 @@ | |||
11 | WITHOUT ANY WARRANTY; without even the implied warranty of | 11 | WITHOUT ANY WARRANTY; without even the implied warranty of |
12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
13 | Affero General Public License for more details. | 13 | Affero General Public License for more details. |
14 | 14 | ||
15 | You should have received a copy of the GNU Affero General Public License | 15 | You should have received a copy of the GNU Affero General Public License |
16 | along with this program. If not, see <http://www.gnu.org/licenses/>. | 16 | along with this program. If not, see <http://www.gnu.org/licenses/>. |
17 | 17 | ||
18 | SPDX-License-Identifier: AGPL3.0-or-later | 18 | SPDX-License-Identifier: AGPL3.0-or-later |
19 | */ | 19 | */ |
20 | 20 | ||
21 | /** | 21 | /** |
22 | * @file set/gnunet-service-set_union_strata_estimator.h | 22 | * @file set/gnunet-service-set_union_strata_estimator.h |
@@ -43,8 +43,7 @@ extern "C" | |||
43 | /** | 43 | /** |
44 | * A handle to a strata estimator. | 44 | * A handle to a strata estimator. |
45 | */ | 45 | */ |
46 | struct StrataEstimator | 46 | struct StrataEstimator { |
47 | { | ||
48 | /** | 47 | /** |
49 | * The IBFs of this strata estimator. | 48 | * The IBFs of this strata estimator. |
50 | */ | 49 | */ |
@@ -70,8 +69,8 @@ struct StrataEstimator | |||
70 | * @return number of bytes written to @a buf | 69 | * @return number of bytes written to @a buf |
71 | */ | 70 | */ |
72 | size_t | 71 | size_t |
73 | strata_estimator_write (const struct StrataEstimator *se, | 72 | strata_estimator_write(const struct StrataEstimator *se, |
74 | void *buf); | 73 | void *buf); |
75 | 74 | ||
76 | 75 | ||
77 | /** | 76 | /** |
@@ -85,10 +84,10 @@ strata_estimator_write (const struct StrataEstimator *se, | |||
85 | * @return #GNUNET_OK on success | 84 | * @return #GNUNET_OK on success |
86 | */ | 85 | */ |
87 | int | 86 | int |
88 | strata_estimator_read (const void *buf, | 87 | strata_estimator_read(const void *buf, |
89 | size_t buf_len, | 88 | size_t buf_len, |
90 | int is_compressed, | 89 | int is_compressed, |
91 | struct StrataEstimator *se); | 90 | struct StrataEstimator *se); |
92 | 91 | ||
93 | 92 | ||
94 | /** | 93 | /** |
@@ -100,9 +99,9 @@ strata_estimator_read (const void *buf, | |||
100 | * @return a freshly allocated, empty strata estimator, NULL on error | 99 | * @return a freshly allocated, empty strata estimator, NULL on error |
101 | */ | 100 | */ |
102 | struct StrataEstimator * | 101 | struct StrataEstimator * |
103 | strata_estimator_create (unsigned int strata_count, | 102 | strata_estimator_create(unsigned int strata_count, |
104 | uint32_t ibf_size, | 103 | uint32_t ibf_size, |
105 | uint8_t ibf_hashnum); | 104 | uint8_t ibf_hashnum); |
106 | 105 | ||
107 | 106 | ||
108 | /** | 107 | /** |
@@ -114,8 +113,8 @@ strata_estimator_create (unsigned int strata_count, | |||
114 | * @return abs(|se1| - |se2|) | 113 | * @return abs(|se1| - |se2|) |
115 | */ | 114 | */ |
116 | unsigned int | 115 | unsigned int |
117 | strata_estimator_difference (const struct StrataEstimator *se1, | 116 | strata_estimator_difference(const struct StrataEstimator *se1, |
118 | const struct StrataEstimator *se2); | 117 | const struct StrataEstimator *se2); |
119 | 118 | ||
120 | 119 | ||
121 | /** | 120 | /** |
@@ -125,8 +124,8 @@ strata_estimator_difference (const struct StrataEstimator *se1, | |||
125 | * @param key key to add | 124 | * @param key key to add |
126 | */ | 125 | */ |
127 | void | 126 | void |
128 | strata_estimator_insert (struct StrataEstimator *se, | 127 | strata_estimator_insert(struct StrataEstimator *se, |
129 | struct IBF_Key key); | 128 | struct IBF_Key key); |
130 | 129 | ||
131 | 130 | ||
132 | /** | 131 | /** |
@@ -136,8 +135,8 @@ strata_estimator_insert (struct StrataEstimator *se, | |||
136 | * @param key key to remove | 135 | * @param key key to remove |
137 | */ | 136 | */ |
138 | void | 137 | void |
139 | strata_estimator_remove (struct StrataEstimator *se, | 138 | strata_estimator_remove(struct StrataEstimator *se, |
140 | struct IBF_Key key); | 139 | struct IBF_Key key); |
141 | 140 | ||
142 | 141 | ||
143 | /** | 142 | /** |
@@ -146,7 +145,7 @@ strata_estimator_remove (struct StrataEstimator *se, | |||
146 | * @param se strata estimator to destroy. | 145 | * @param se strata estimator to destroy. |
147 | */ | 146 | */ |
148 | void | 147 | void |
149 | strata_estimator_destroy (struct StrataEstimator *se); | 148 | strata_estimator_destroy(struct StrataEstimator *se); |
150 | 149 | ||
151 | 150 | ||
152 | /** | 151 | /** |
@@ -156,7 +155,7 @@ strata_estimator_destroy (struct StrataEstimator *se); | |||
156 | * @return the copy | 155 | * @return the copy |
157 | */ | 156 | */ |
158 | struct StrataEstimator * | 157 | struct StrataEstimator * |
159 | strata_estimator_dup (struct StrataEstimator *se); | 158 | strata_estimator_dup(struct StrataEstimator *se); |
160 | 159 | ||
161 | 160 | ||
162 | #if 0 /* keep Emacsens' auto-indent happy */ | 161 | #if 0 /* keep Emacsens' auto-indent happy */ |