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: deea49b435964ffbdc1d453f513af8b694a5b81bce8777d48fe3988d7476a538
4
- data.tar.gz: e59c962f8fe1c0b5175a4ef0b076d8e19756de874d0ec300dd91c08f829f73c6
3
+ metadata.gz: 4908d3d98b8094b81746412d4faec9c4d64799d6a5d6333c899b6283af248050
4
+ data.tar.gz: d2caf284bc83ccc6b8ee75033f247ed4cc87f3ac94470f661f6b0a09f69b75e8
5
5
  SHA512:
6
- metadata.gz: 542d7d5976324498d58dc5aeebc66bb9c0fafbe32544a44f0618cb78f2d5957dae947325128075e4c963811adcfa8566acffa280a9c82c23fdbd787d327410be
7
- data.tar.gz: c052d36c667fa9b9638f682e3b71969f1f74009db50a50bf38682adb13122ec1ab6829613ce626233fe06cf787c6d2c473c3359ca183dc565ac1dc3eefa637b9
6
+ metadata.gz: 44728a824a3e7608717bb7f31f063dc098cf090de708bc218f9bf14c89de0de467d932300d95e4bea5bc016da66da5d7f7c25345b8af101d2a88cba14b7f27f3
7
+ data.tar.gz: 9efbd5deaec87ccdadeec2ca79de1604c0e9dd2659d7b8466a67e03f267340080f7ea5265da9e59241072017bb835a852233d52fae586230572f38071222b7c2
data/CHANGELOG.md CHANGED
@@ -1,3 +1,7 @@
1
+ ## 0.4.1 (2023-12-23)
2
+
3
+ - Updated DataSketches to 5.0.1
4
+
1
5
  ## 0.4.0 (2023-11-13)
2
6
 
3
7
  - Updated DataSketches to 5.0.0
@@ -1,3 +1,3 @@
1
1
  module DataSketches
2
- VERSION = "0.4.0"
2
+ VERSION = "0.4.1"
3
3
  end
@@ -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
- std::move(items + raw_beg, items + raw_lim, items + out_levels[current_level]);
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
- items[out_levels[current_level]] = std::move(items[raw_beg]);
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: " << (bool(partial_item_) ? (*partial_item_) : "NULL") << std::endl;
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.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.0
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-14 00:00:00.000000000 Z
11
+ date: 2023-12-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rice