Skip to content

Commit 2af54a4

Browse files
Subhadeep Karanmeta-codesync[bot]
authored andcommitted
Fix typos in comments and documentation (#4661)
Summary: Pull Request resolved: #4661 as the title suggests Reviewed By: alibeklfc Differential Revision: D86405490 fbshipit-source-id: bb4b7062fcf3c68143d69eb809cd4f6b0005f5b1
1 parent ec877e7 commit 2af54a4

File tree

7 files changed

+9
-9
lines changed

7 files changed

+9
-9
lines changed

faiss/impl/AuxIndexStructures.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ RangeSearchResult::RangeSearchResult(size_t nq, bool alloc_lims) : nq(nq) {
3636
/// for each query
3737
void RangeSearchResult::do_allocation() {
3838
// works only if all the partial results are aggregated
39-
// simulatenously
39+
// simultaneously
4040
FAISS_THROW_IF_NOT(labels == nullptr && distances == nullptr);
4141
size_t ofs = 0;
4242
for (int i = 0; i < nq; i++) {

faiss/impl/HNSW.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ struct HNSW {
8787
int count_below(float thresh);
8888
};
8989

90-
/// to sort pairs of (id, distance) from nearest to fathest or the reverse
90+
/// to sort pairs of (id, distance) from nearest to farthest or the reverse
9191
struct NodeDistCloser {
9292
float d;
9393
int id;
@@ -160,7 +160,7 @@ struct HNSW {
160160
/// nb of neighbors for this level
161161
int nb_neighbors(int layer_no) const;
162162

163-
/// cumumlative nb up to (and excluding) this level
163+
/// cumulative nb up to (and excluding) this level
164164
int cum_nb_neighbors(int layer_no) const;
165165

166166
/// range of entries in the neighbors table of vertex no at layer_no

faiss/impl/IDSelector.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ void IDSelectorRange::find_sorted_ids_bounds(
3131
*jmin_out = *jmax_out = 0;
3232
return;
3333
}
34-
// bissection to find imin
34+
// bisection to find imin
3535
if (ids[0] >= imin) {
3636
*jmin_out = 0;
3737
} else {
@@ -46,7 +46,7 @@ void IDSelectorRange::find_sorted_ids_bounds(
4646
}
4747
*jmin_out = j1;
4848
}
49-
// bissection to find imax
49+
// bisection to find imax
5050
if (*jmin_out == list_size || ids[*jmin_out] >= imax) {
5151
*jmax_out = *jmin_out;
5252
} else {

faiss/impl/LocalSearchQuantizer.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ struct LocalSearchQuantizer : AdditiveQuantizer {
138138
/** Add some perturbation to codebooks
139139
*
140140
* @param T temperature of simulated annealing
141-
* @param stddev standard derivations of each dimension in training data
141+
* @param stddev standard deviations of each dimension in training data
142142
*/
143143
void perturb_codebooks(
144144
float T,

faiss/impl/ProductQuantizer.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,7 @@ struct ProductQuantizer : Quantizer {
166166
/// Symmetric Distance Table
167167
std::vector<float> sdc_table;
168168

169-
// intitialize the SDC table from the centroids
169+
// initialize the SDC table from the centroids
170170
void compute_sdc_table();
171171

172172
void search_sdc(

faiss/impl/ResidualQuantizer.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ struct ResidualQuantizer : AdditiveQuantizer {
4949
* first element of the beam (faster but less accurate) */
5050
static const int Train_top_beam = 1024;
5151

52-
/** set this bit to *not* autmatically compute the codebook tables
52+
/** set this bit to *not* automatically compute the codebook tables
5353
* after training */
5454
static const int Skip_codebook_tables = 2048;
5555

faiss/impl/ScalarQuantizer.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ struct ScalarQuantizer : Quantizer {
4040
QuantizerType qtype = QT_8bit;
4141

4242
/** The uniform encoder can estimate the range of representable
43-
* values of the unform encoder using different statistics. Here
43+
* values of the uniform encoder using different statistics. Here
4444
* rs = rangestat_arg */
4545

4646
// rangestat_arg.

0 commit comments

Comments
 (0)