-
Notifications
You must be signed in to change notification settings - Fork 221
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixing compile errors and some formatting issues
- Loading branch information
Showing
13 changed files
with
160 additions
and
298 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,35 +1,25 @@ | ||
#pragma once | ||
#include "multi_filter/abstract_predicate.h" | ||
#include "types.h" | ||
#include "windows_customizations.h" | ||
#include <vector> | ||
|
||
namespace diskann { | ||
template <typename LabelT> class AbstractFilterStore { | ||
public: | ||
/// <summary> | ||
/// Returns the filters for a data point. Only valid for base points | ||
/// </summary> | ||
/// <param name="point">base point id</param> | ||
/// <returns>list of filters of the base point</returns> | ||
virtual const std::vector<LabelT> & | ||
get_filters_for_point(location_t point) const = 0; | ||
DISKANN_DLLEXPORT virtual bool has_filter_support() const = 0; | ||
|
||
DISKANN_DLLEXPORT virtual bool | ||
point_has_label(location_t point_id, const LabelT label_id) const = 0; | ||
|
||
/// <summary> | ||
/// Adds filters for a point. | ||
/// </summary> | ||
/// <param name="point"></param> | ||
/// <param name="filters"></param> | ||
virtual void add_filters_for_point(location_t point, | ||
const std::vector<LabelT> &filters) = 0; | ||
// Returns true if the index is filter-enabled and all files were loaded | ||
// correctly. false otherwise. Note that "false" can mean that the index | ||
// does not have filter support, or that some index files do not exist, or | ||
// that they exist and could not be opened. | ||
DISKANN_DLLEXPORT virtual bool load(const std::string &disk_index_file) = 0; | ||
|
||
/// <summary> | ||
/// Returns a score between [0,1] indicating how many points in the dataset | ||
/// matched the predicate | ||
/// </summary> | ||
/// <param name="pred">Predicate to match</param> | ||
/// <returns>Score between [0,1] indicate %age of points matching | ||
/// pred</returns> | ||
virtual float | ||
get_predicate_selectivity(const AbstractPredicate &pred) const = 0; | ||
DISKANN_DLLEXPORT virtual void | ||
generate_random_labels(std::vector<LabelT> &labels, const uint32_t num_labels, | ||
const uint32_t nthreads) = 0; | ||
}; | ||
|
||
} // namespace diskann |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
#pragma once | ||
#include "windows_customizations.h" | ||
#include <cstdint> | ||
#include <cstring> | ||
|
||
namespace diskann { | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.