Faiss
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends
Public Member Functions | Public Attributes | List of all members
faiss::RankingScore2 Struct Reference
Inheritance diagram for faiss::RankingScore2:
faiss::Score3Computer< float, double > faiss::PermutationObjective

Public Member Functions

 RankingScore2 (int nbits, int nq, int nb, const uint32_t *qcodes, const uint32_t *bcodes, const float *gt_distances)
 
double rank_weight (int r)
 
double accum_gt_weight_diff (const std::vector< int > &a, const std::vector< int > &b)
 
void init_n_gt ()
 
- Public Member Functions inherited from faiss::Score3Computer< float, double >
double compute (const int *perm) const
 
double compute_update (const int *perm, int iw, int jw) const
 
double update_i (const int *perm, int iw, int jw, int ip0, int ip, const float *n_gt_i) const
 
double update_i_plane (const int *perm, int iw, int jw, int ip0, int ip, const float *n_gt_i) const
 
double update_k (const int *perm, int iw, int jw, int ip0, int ip, int jp0, int jp, int k, const float *n_gt_ij) const
 used for the 8 cells were the 3 indices are swapped
 
double update_j_line (const int *perm, int iw, int jw, int ip0, int ip, int jp0, int jp, const float *n_gt_ij) const
 compute update on a line of k's, where i and j are swapped
 
double update_i_cross (const int *perm, int iw, int jw, int ip0, int ip, const float *n_gt_i) const
 considers the 2 pairs of crossing lines j=iw or jw and k = iw or kw
 
virtual double compute_cost (const int *perm) const
 
virtual double cost_update (const int *perm, int iw, int jw) const
 

Public Attributes

int nbits
 
int nq
 
int nb
 
const uint32_t * qcodes
 
const uint32_t * bcodes
 
const float * gt_distances
 
- Public Attributes inherited from faiss::Score3Computer< float, double >
int nc
 
std::vector< float > n_gt
 
- Public Attributes inherited from faiss::PermutationObjective
int n
 

Detailed Description

Definition at line 667 of file PolysemousTraining.cpp.

Member Function Documentation

double faiss::RankingScore2::accum_gt_weight_diff ( const std::vector< int > &  a,
const std::vector< int > &  b 
)
inline

count nb of i, j in a x b st. i < j a and b should be sorted on input they are the ranks of j and k respectively. specific version for diff-of-rank weighting, cannot optimized with a cumulative table

Definition at line 695 of file PolysemousTraining.cpp.


The documentation for this struct was generated from the following file: