51 static void allocateBuffers(uint64_t numEntity,
ui numDimension,
TableEntry **&valueTable,
double **&backup);
52 static void releaseBuffers(
ui numDimension,
TableEntry **&valueTable,
double **&backup);
57 static void prepareSelf(
const std::vector<std::vector<ui>> &records,
const std::vector<ui> &id_map,
59 std::vector<std::pair<int, int>> &id2Pair,
61 ui numRow, uint64_t &numEntity);
63 static void prepareSelfWeighted(
const std::vector<std::vector<ui>> &records,
const std::vector<ui> &id_map,
64 const std::vector<double> &recWeights,
const std::vector<double> &
wordwt,
66 std::vector<std::pair<int, int>> &id2Pair,
68 ui numRow, uint64_t &numEntity);
72 static void prepareRS(
const std::vector<std::vector<ui>> &
recordsA,
const std::vector<std::vector<ui>> &
recordsB,
75 std::vector<std::pair<int, int>> &id2Pair,
77 ui numRowA,
ui numRowB, uint64_t &numEntity);
79 static void prepareRSWeighted(
const std::vector<std::vector<ui>> &
recordsA,
const std::vector<std::vector<ui>> &
recordsB,
81 const std::vector<double> &recWeightsA,
const std::vector<double> &recWeightsB,
82 const std::vector<double> &
wordwt,
84 std::vector<std::pair<int, int>> &id2Pair,
86 ui numRowA,
ui numRowB, uint64_t &numEntity);
97 static void updateFinalPairs(
const std::vector<ui> &topKidMapA,
const std::vector<ui> &topKidMapB,
const std::vector<std::pair<int, int>> &id2Pair,
99 std::vector<std::vector<int>> &
final_pairs, uint64_t K);
101 static void getCurrentRecall(
const std::vector<ui> &topKidMapA,
const std::vector<ui> &topKidMapB,
const std::vector<std::pair<int, int>> &id2Pair,
103 const std::vector<std::pair<int, int>> &golds, uint64_t K, uint64_t cartesian);
105 static void getCurrentRecallExp(
const std::vector<ui> &topKidMapA,
const std::vector<ui> &topKidMapB,
const std::vector<std::pair<int, int>> &id2Pair,
107 const std::vector<std::pair<int, int>> &golds, uint64_t K, uint64_t cartesian,
108 std::ofstream &statStream);
113 const std::vector<std::vector<std::vector<ui>>> &
recordsA,
114 const std::vector<std::vector<double>> &recWeights,
115 const std::vector<std::vector<double>> &
wordwt,
116 const std::unordered_map<std::string, ui> &
datasets_map,
117 const std::vector<std::vector<ui>> &
id_mapA,
119 const Table &groundTruth, uint64_t K, std::ofstream &statStream,
120 bool ifWeighted =
false,
const std::string &mode =
"exp");
123 const std::vector<std::vector<std::vector<ui>>> &
recordsA,
124 const std::vector<std::vector<std::vector<ui>>> &
recordsB,
125 const std::vector<std::vector<double>> &recWeightsA,
126 const std::vector<std::vector<double>> &recWeightsB,
127 const std::vector<std::vector<double>> &
wordwt,
128 const std::unordered_map<std::string, ui> &
datasets_map,
129 const std::vector<std::vector<ui>> &
id_mapA,
130 const std::vector<std::vector<ui>> &
id_mapB,
132 const Table &groundTruth, uint64_t K, std::ofstream &statStream,
133 bool ifWeighted =
false,
const std::string &mode =
"exp");
139 const std::vector<std::vector<std::vector<ui>>> &
recordsA,
140 const std::unordered_map<std::string, ui> &
datasets_map,
141 const std::vector<std::vector<ui>> &
id_mapA,
151 static void updateFinalPairs(
const std::vector<ui> &sortedIdMap,
const std::vector<std::pair<int, int>> &allPairs,
152 std::vector<std::vector<int>> &
final_pairs, uint64_t K);
154 static void getCurrentRecall(
const std::vector<ui> &sortedIdMap,
const std::vector<std::pair<int, int>> &allPairs,
155 const std::vector<std::pair<int, int>> &golds, uint64_t K, uint64_t cartesian);
157 static void getCurrentRecallExp(
const std::vector<ui> &sortedIdMap,
const std::vector<std::pair<int, int>> &allPairs,
158 const std::vector<std::pair<int, int>> &golds, uint64_t K, uint64_t cartesian,
159 std::ofstream &statStream);
163 const std::vector<double> &simWeights,
164 const std::unordered_map<std::string, double> &attrAverage,
165 const std::vector<std::vector<std::vector<ui>>> &
recordsA,
166 const std::vector<std::vector<std::vector<ui>>> &
recordsB,
167 const std::vector<std::vector<double>> &recWeightsA,
168 const std::vector<std::vector<double>> &recWeightsB,
169 const std::vector<std::vector<double>> &
wordwt,
170 const std::unordered_map<std::string, ui> &
datasets_map,
171 const std::vector<std::vector<ui>> &
id_mapA,
172 const std::vector<std::vector<ui>> &
id_mapB,
173 const std::vector<std::vector<ui>> &id_mapAString,
174 const std::vector<std::vector<ui>> &id_mapBString,
176 const Table &groundTruth, uint64_t K,
ui numRule,
177 std::ofstream &statStream,
bool isWeighted =
false,
178 const std::string &mode =
"exp");
181 const std::unordered_map<std::string, double> &attrAverage,
182 const std::vector<std::vector<std::vector<ui>>> &records,
183 const std::vector<std::vector<double>> &recWeights,
184 const std::vector<std::vector<double>> &
wordwt,
185 const std::unordered_map<std::string, ui> &
datasets_map,
186 const std::vector<std::vector<ui>> &id_map,
187 const std::vector<std::vector<ui>> &id_mapString,
189 const Table &groundTruth, u_int64_t K,
ui numRule,
190 std::ofstream &statStream,
bool isWeighted =
false,
191 const std::string &mode =
"exp");
195 void topKviaTATable(
const Table &matchRes, uint64_t K, std::vector<std::vector<std::string>> &newTable);
static void topKviaAllSimilarityScoresRS(const Table &table_A, const Table &table_B, const Rule *rules, const std::vector< double > &simWeights, const std::unordered_map< std::string, double > &attrAverage, const std::vector< std::vector< std::vector< ui > > > &recordsA, const std::vector< std::vector< std::vector< ui > > > &recordsB, const std::vector< std::vector< double > > &recWeightsA, const std::vector< std::vector< double > > &recWeightsB, const std::vector< std::vector< double > > &wordwt, const std::unordered_map< std::string, ui > &datasets_map, const std::vector< std::vector< ui > > &id_mapA, const std::vector< std::vector< ui > > &id_mapB, const std::vector< std::vector< ui > > &id_mapAString, const std::vector< std::vector< ui > > &id_mapBString, std::vector< std::vector< int > > &final_pairs, const Table &groundTruth, uint64_t K, ui numRule, std::ofstream &statStream, bool isWeighted=false, const std::string &mode="exp")
Definition topk.cc:887