Skip to content

Commit 6ae08a2

Browse files
committed
expose integer label get/set
1 parent d54db94 commit 6ae08a2

File tree

3 files changed

+6
-3
lines changed

3 files changed

+6
-3
lines changed

include/abstract_index.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,9 @@ class AbstractIndex
112112

113113
template <typename label_type> void set_universal_label(const label_type universal_label);
114114

115+
virtual void enable_integer_label() = 0;
116+
virtual bool integer_label_enabled() const = 0;
117+
115118
virtual bool is_label_valid(const std::string &raw_label) const = 0;
116119
virtual bool is_set_universal_label() const = 0;
117120
virtual TableStats get_table_stats() const = 0;

include/index.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -119,9 +119,9 @@ template <typename T, typename TagT = uint32_t, typename LabelT = uint32_t> clas
119119

120120
DISKANN_DLLEXPORT bool is_set_universal_label() const override;
121121

122-
DISKANN_DLLEXPORT void enable_integer_label();
122+
DISKANN_DLLEXPORT void enable_integer_label() override;
123123

124-
DISKANN_DLLEXPORT bool integer_label_enabled();
124+
DISKANN_DLLEXPORT bool integer_label_enabled() const override;
125125

126126
// Set starting point of an index before inserting any points incrementally.
127127
// The data count should be equal to _num_frozen_pts * _aligned_dim.

src/index.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2073,7 +2073,7 @@ void Index<T, TagT, LabelT>::enable_integer_label()
20732073
}
20742074

20752075
template <typename T, typename TagT, typename LabelT>
2076-
bool Index<T, TagT, LabelT>::integer_label_enabled()
2076+
bool Index<T, TagT, LabelT>::integer_label_enabled() const
20772077
{
20782078
return _use_integer_labels;
20792079
}

0 commit comments

Comments
 (0)