Fix typos in comments and documentation (#4661)

Summary:
Pull Request resolved: https://github.com/facebookresearch/faiss/pull/4661

as the title suggests

Reviewed By: alibeklfc

Differential Revision: D86405490

fbshipit-source-id: bb4b7062fcf3c68143d69eb809cd4f6b0005f5b1
This commit is contained in:
Subhadeep Karan
2025-11-06 15:21:01 -08:00
committed by meta-codesync[bot]
parent ec877e794e
commit 2af54a46bb
7 changed files with 9 additions and 9 deletions
+1 -1
View File
@@ -36,7 +36,7 @@ RangeSearchResult::RangeSearchResult(size_t nq, bool alloc_lims) : nq(nq) {
/// for each query
void RangeSearchResult::do_allocation() {
// works only if all the partial results are aggregated
// simulatenously
// simultaneously
FAISS_THROW_IF_NOT(labels == nullptr && distances == nullptr);
size_t ofs = 0;
for (int i = 0; i < nq; i++) {
+2 -2
View File
@@ -87,7 +87,7 @@ struct HNSW {
int count_below(float thresh);
};
/// to sort pairs of (id, distance) from nearest to fathest or the reverse
/// to sort pairs of (id, distance) from nearest to farthest or the reverse
struct NodeDistCloser {
float d;
int id;
@@ -160,7 +160,7 @@ struct HNSW {
/// nb of neighbors for this level
int nb_neighbors(int layer_no) const;
/// cumumlative nb up to (and excluding) this level
/// cumulative nb up to (and excluding) this level
int cum_nb_neighbors(int layer_no) const;
/// range of entries in the neighbors table of vertex no at layer_no
+2 -2
View File
@@ -31,7 +31,7 @@ void IDSelectorRange::find_sorted_ids_bounds(
*jmin_out = *jmax_out = 0;
return;
}
// bissection to find imin
// bisection to find imin
if (ids[0] >= imin) {
*jmin_out = 0;
} else {
@@ -46,7 +46,7 @@ void IDSelectorRange::find_sorted_ids_bounds(
}
*jmin_out = j1;
}
// bissection to find imax
// bisection to find imax
if (*jmin_out == list_size || ids[*jmin_out] >= imax) {
*jmax_out = *jmin_out;
} else {
+1 -1
View File
@@ -138,7 +138,7 @@ struct LocalSearchQuantizer : AdditiveQuantizer {
/** Add some perturbation to codebooks
*
* @param T temperature of simulated annealing
* @param stddev standard derivations of each dimension in training data
* @param stddev standard deviations of each dimension in training data
*/
void perturb_codebooks(
float T,
+1 -1
View File
@@ -166,7 +166,7 @@ struct ProductQuantizer : Quantizer {
/// Symmetric Distance Table
std::vector<float> sdc_table;
// intitialize the SDC table from the centroids
// initialize the SDC table from the centroids
void compute_sdc_table();
void search_sdc(
+1 -1
View File
@@ -49,7 +49,7 @@ struct ResidualQuantizer : AdditiveQuantizer {
* first element of the beam (faster but less accurate) */
static const int Train_top_beam = 1024;
/** set this bit to *not* autmatically compute the codebook tables
/** set this bit to *not* automatically compute the codebook tables
* after training */
static const int Skip_codebook_tables = 2048;
+1 -1
View File
@@ -40,7 +40,7 @@ struct ScalarQuantizer : Quantizer {
QuantizerType qtype = QT_8bit;
/** The uniform encoder can estimate the range of representable
* values of the unform encoder using different statistics. Here
* values of the uniform encoder using different statistics. Here
* rs = rangestat_arg */
// rangestat_arg.