Add calculation of close-tangibles
This commit is contained in:
@@ -28,7 +28,6 @@ std::string id_vector_debug_string(const IdVector &idv) {
|
||||
return oss.str();
|
||||
}
|
||||
|
||||
|
||||
IdVector sort_union_id_vectors(const IdVector &v1, const IdVector &v2) {
|
||||
IdVector result(v1.size() + v2.size());
|
||||
int next = 0;
|
||||
@@ -47,6 +46,13 @@ IdVector sort_union_id_vectors(const IdVector &v1, const IdVector &v2) {
|
||||
return result;
|
||||
}
|
||||
|
||||
HashValue hash_id_vector(const IdVector &idv) {
|
||||
uint64_t hash1 = 0;
|
||||
uint64_t hash2 = 0;
|
||||
SpookyHash::Hash128(&idv[0], idv.size() * sizeof(int64_t), &hash1, &hash2);
|
||||
return std::make_pair(hash1, hash2);
|
||||
}
|
||||
|
||||
StringVec split(const std::string &s, char sep) {
|
||||
StringVec result;
|
||||
int start = 0;
|
||||
|
||||
Reference in New Issue
Block a user