Home | History | Annotate | Download | only in fst

Lines Matching refs:FP

271 // It is passed a function object FP that should fingerprint entries
273 // VectorBiTable constructs the FP object. The user can instead
276 template <class I, class T, class FP>
280 explicit VectorBiTable(FP *fp = 0, size_t table_size = 0)
281 : fp_(fp ? fp : new FP()) {
286 VectorBiTable(const VectorBiTable<I, T, FP> &table)
287 : fp_(table.fp_ ? new FP(*table.fp_) : 0),
294 ssize_t fp = (*fp_)(entry);
295 if (fp >= fp2id_.size())
296 fp2id_.resize(fp + 1);
297 I &id_ref = fp2id_[fp];
313 const FP &Fingerprint() const { return *fp_; }
316 FP *fp_;
320 void operator=(const VectorBiTable<I, T, FP> &table); // disallow
326 // vector. The fingerprinting functor FP returns a unique fingerprint
331 template <class I, class T, class S, class FP, class H, HSType HS = HS_DENSE>
337 explicit VectorHashBiTable(S *s, FP *fp = 0, H *h = 0,
341 fp_(fp ? fp : new FP()),
352 VectorHashBiTable(const VectorHashBiTable<I, T, S, FP, H, HS> &table)
354 fp_(table.fp_ ? new FP(*table.fp_) : 0),
372 uint64 fp = (*fp_)(entry);
373 if (fp2id_.size() <= fp)
374 fp2id_.resize(fp + 1, 0);
375 if (fp2id_[fp] == 0) { // T not found
378 fp2id_[fp] = id2entry_.size();
383 return fp2id_[fp] - 1; // NB: assoc_value = ID + 1
410 const FP &Fingerprint() const { return *fp_; }
458 FP *fp_; // Fingerprint used when hashing entry into vector
472 void operator=(const VectorHashBiTable<I, T, S, FP, H, HS> &table);
475 template <class I, class T, class S, class FP, class H, HSType HS>
476 const I VectorHashBiTable<I, T, S, FP, H, HS>::kCurrentKey = -1;
478 template <class I, class T, class S, class FP, class H, HSType HS>
479 const I VectorHashBiTable<I, T, S, FP, H, HS>::kEmptyKey = -3;