datasketches 0.4.0 → 0.4.1
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4908d3d98b8094b81746412d4faec9c4d64799d6a5d6333c899b6283af248050
|
4
|
+
data.tar.gz: d2caf284bc83ccc6b8ee75033f247ed4cc87f3ac94470f661f6b0a09f69b75e8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 44728a824a3e7608717bb7f31f063dc098cf090de708bc218f9bf14c89de0de467d932300d95e4bea5bc016da66da5d7f7c25345b8af101d2a88cba14b7f27f3
|
7
|
+
data.tar.gz: 9efbd5deaec87ccdadeec2ca79de1604c0e9dd2659d7b8466a67e03f267340080f7ea5265da9e59241072017bb835a852233d52fae586230572f38071222b7c2
|
data/CHANGELOG.md
CHANGED
data/lib/datasketches/version.rb
CHANGED
@@ -230,7 +230,8 @@ kll_helper::compress_result kll_helper::general_compress(uint16_t k, uint8_t m,
|
|
230
230
|
// move level over as is
|
231
231
|
// make sure we are not moving data upwards
|
232
232
|
if (raw_beg < out_levels[current_level]) throw std::logic_error("wrong move");
|
233
|
-
|
233
|
+
if (raw_beg != out_levels[current_level])
|
234
|
+
std::move(items + raw_beg, items + raw_lim, items + out_levels[current_level]);
|
234
235
|
out_levels[current_level + 1] = out_levels[current_level] + raw_pop;
|
235
236
|
} else {
|
236
237
|
// The sketch is too full AND this level is too full, so we compact it
|
@@ -243,7 +244,8 @@ kll_helper::compress_result kll_helper::general_compress(uint16_t k, uint8_t m,
|
|
243
244
|
const auto half_adj_pop = adj_pop / 2;
|
244
245
|
|
245
246
|
if (odd_pop) { // move one guy over
|
246
|
-
|
247
|
+
if (out_levels[current_level] != raw_beg)
|
248
|
+
items[out_levels[current_level]] = std::move(items[raw_beg]);
|
247
249
|
out_levels[current_level + 1] = out_levels[current_level] + 1;
|
248
250
|
} else { // even number of items
|
249
251
|
out_levels[current_level + 1] = out_levels[current_level];
|
@@ -178,7 +178,11 @@ string<A> ebpps_sample<T ,A>::to_string() const {
|
|
178
178
|
uint32_t idx = 0;
|
179
179
|
for (const T& item : data_)
|
180
180
|
oss << "\t" << idx++ << ":\t" << item << std::endl;
|
181
|
-
oss << " partial: "
|
181
|
+
oss << " partial: ";
|
182
|
+
if (bool(partial_item_))
|
183
|
+
oss << (*partial_item_) << std::endl;
|
184
|
+
else
|
185
|
+
oss << "NULL" << std::endl;
|
182
186
|
|
183
187
|
return oss.str();
|
184
188
|
}
|
@@ -1 +1 @@
|
|
1
|
-
5.0.
|
1
|
+
5.0.1
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: datasketches
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.4.
|
4
|
+
version: 0.4.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Andrew Kane
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-
|
11
|
+
date: 2023-12-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rice
|