#ifndef SIM_HASH_H #define SIM_HASH_H #include "MurmurHash3.h" #include #include #include #include #include #include #include constexpr size_t HASH_BITS = 128; class SimHash { private: size_t bits; std::vector idfWeights; // Trọng số IDF cho từng đặc trưng public: explicit SimHash(size_t bit = HASH_BITS); ~SimHash(); std::vector hashify_double_by_murmur128(double x, int idx, int bits_count = 64); std::string encode_double(double x, int idx); void IDF(const std::vector> &allFeatures); size_t hashFunction(const std::vector &featureVector); }; #endif // SIM_HASH_H