From 8b0135c67443364cebe18348647fd88084b3bea8 Mon Sep 17 00:00:00 2001 From: Ben Langmead Date: Sat, 9 May 2020 14:20:24 -0400 Subject: [PATCH] removed GPL mentions --- src/compact_hash.h | 8 +++++--- src/hyperloglogplus.cc | 15 +-------------- src/hyperloglogplus.h | 16 ++-------------- 3 files changed, 8 insertions(+), 31 deletions(-) diff --git a/src/compact_hash.h b/src/compact_hash.h index 3c07f5e..1d82d03 100644 --- a/src/compact_hash.h +++ b/src/compact_hash.h @@ -33,11 +33,13 @@ struct CompactHashCell { if (max_value < val) errx(EX_SOFTWARE, "value len of %u too small for value of %llu", (unsigned int) value_bits, (unsigned long long int) val); - data = (uint32_t) (MurmurHash3(key) >> 32); - data &= ~((1 << value_bits) - 1); - data |= val; + data = (uint32_t) (MurmurHash3(key) >> 32); // why the shift? why the hash? + data &= ~((1 << value_bits) - 1); // keep only high bits + data |= val; // OR in value } + // value in the low bits + // hash of the key in the high bits uint32_t data; }; diff --git a/src/hyperloglogplus.cc b/src/hyperloglogplus.cc index e0aa37a..1f2b063 100644 --- a/src/hyperloglogplus.cc +++ b/src/hyperloglogplus.cc @@ -1,20 +1,7 @@ /* * Copyright 2017-2018, Florian Breitwieser * - * This file is part of the KrakenUniq taxonomic sequence classification system. - * - * KrakenUniq is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * KrakenUniq is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Kraken. If not, see . + * This file was originally developed for the KrakenUniq taxonomic classification system. */ diff --git a/src/hyperloglogplus.h b/src/hyperloglogplus.h index 58489e9..d2569ed 100644 --- a/src/hyperloglogplus.h +++ b/src/hyperloglogplus.h @@ -1,21 +1,9 @@ /* * Copyright 2017-2018, Florian Breitwieser * - * This file is part of the KrakenUniq taxonomic sequence classification system. - * - * KrakenUniq is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * KrakenUniq is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Kraken. If not, see . + * This file was originally developed for the KrakenUniq taxonomic classification system. */ + /* * Implementation of 64-bit HyperLogLog algorithm by Flajolet et al., * with sparse mode for increased precision with low cardinalities (Stefan Heule et al.), and