LIMA
Libre Multilingual Analyzer — C++ API
Loading...
Searching...
No Matches
lshsignature.h
Go to the documentation of this file.
1// Copyright 2002-2013 CEA LIST
2// SPDX-FileCopyrightText: 2022 CEA LIST <gael.de-chalendar@cea.fr>
3//
4// SPDX-License-Identifier: MIT
5
6//
7// C++ Interface: lshsignature
8//
9// Description:
10//
11//
12// Author: Claire Mouton, Guillaume Pitel <claire.mouton@cea.fr, guillaume.pitel@gmail.com>, (C) 2008
13//
14// Copyright: See COPYING file that comes with this distribution
15//
16//
17
18#ifndef LSHSIGNATURE_H
19#define LSHSIGNATURE_H
20
22#include <vector>
23#include <string>
24#include <iostream>
25#include <sstream>
26#include <stdlib.h>
27
34{
35public:
36 typedef uint64_t base;
37
38 LSHSignature ( int bitLength );
39 LSHSignature ( const LSHSignature & s);
40 LSHSignature& operator=( const LSHSignature & s);
41
43
44 base* getData();
45
46 int getBitLength();
47
48 void setBit(uint b);
49
50 void unsetBit(uint b);
51 bool getBit(uint b);
52
53
54 void merge(std::vector<LSHSignature>& sigs);
55
56 void print(double rank, int limit);
57
58 void xorX ( LSHSignature & signature );
59
60 int bitCount();
61
62 int bitCount64(int where);
63
64 bool comparePermutedBits(LSHSignature & s, std::vector<int>& permutations);
65
66private:
67 int precomputedCount;
68 base *data;
69 int bitLength;
70};
71
72#endif
#define LIMA_WORDSENSEANALYSIS_EXPORT
uint64_t base