Skip to content
This repository was archived by the owner on Sep 27, 2019. It is now read-only.

Commit 4382df2

Browse files
authored
Merge branch 'master' into saatviks_tfmemleakfix
2 parents 7afd9fd + 9799637 commit 4382df2

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/brain/kd_tree.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ void KDTree::Update(UNUSED_ATTRIBUTE Cluster *cluster) {
3434
// to the structure. Will need to change AnnoyIndex to optimize this
3535
// The update to the centroid is reflected in the cluster. There is no change
3636
// to the clusters_, so just rebuild the entire index
37-
index_.reinitialize();
37+
index_.unload();
3838
Build();
3939
}
4040

@@ -64,7 +64,7 @@ void KDTree::Build() {
6464
}
6565

6666
void KDTree::Build(std::set<Cluster *> &clusters) {
67-
index_.reinitialize();
67+
index_.unload();
6868
clusters_.clear();
6969
for (auto &cluster : clusters) {
7070
clusters_.push_back(cluster);

src/include/brain/kd_tree.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ class KDTree {
5151
*
5252
* @param feature - the vector whose nearest neigbor is being searched for
5353
* @param cluster - return the cluster of the nearest neighbor in this
54-
* @param feature - return the similarity to the nearest neighbor in this
54+
* @param similarity - return the similarity to the nearest neighbor in this
5555
*/
5656
void GetNN(std::vector<double> &feature, Cluster *&cluster,
5757
double &similarity);

0 commit comments

Comments
 (0)