Skip to content

Commit

Permalink
Reformat files
Browse files Browse the repository at this point in the history
  • Loading branch information
elshize committed Dec 9, 2024
1 parent fffd1c9 commit acc5800
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions include/pisa/scorer/quantized.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ class QuantizingScorer {
QuantizingScorer(std::unique_ptr<IndexScorer> scorer, LinearQuantizer quantizer)
: m_scorer(std::move(scorer)), m_quantizer(quantizer) {}

[[nodiscard]] auto term_scorer(std::uint64_t term_id
) const -> std::function<std::uint32_t(std::uint32_t, std::uint32_t)> {
[[nodiscard]] auto term_scorer(std::uint64_t term_id) const
-> std::function<std::uint32_t(std::uint32_t, std::uint32_t)> {
return
[this, scorer = m_scorer->term_scorer(term_id)](std::uint32_t doc, std::uint32_t freq) {
auto score = scorer(doc, freq);
Expand Down
4 changes: 2 additions & 2 deletions test/test_recursive_graph_bisection.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ using namespace pisa;

using StrColl = std::vector<std::vector<std::pair<std::string, std::uint32_t>>>;

[[nodiscard]] auto
coll_to_strings(std::string const& coll_file, std::string const& doclex_file) -> StrColl {
[[nodiscard]] auto coll_to_strings(std::string const& coll_file, std::string const& doclex_file)
-> StrColl {
auto doclex_buf = Payload_Vector_Buffer::from_file(doclex_file);
pisa::Payload_Vector<> doclex(doclex_buf);
pisa::binary_freq_collection coll(coll_file.c_str());
Expand Down
6 changes: 3 additions & 3 deletions tools/read_collection.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@

using namespace pisa;

[[nodiscard]] auto print_function(
std::optional<std::string> const& map_file, std::optional<std::string> const& lex_file
) -> std::function<void(std::uint32_t)> {
[[nodiscard]] auto
print_function(std::optional<std::string> const& map_file, std::optional<std::string> const& lex_file)
-> std::function<void(std::uint32_t)> {
if (map_file) {
return [loaded_map = pisa::io::read_string_vector(*map_file)](std::uint32_t term) {
std::cout << loaded_map.at(term) << ' ';
Expand Down

0 comments on commit acc5800

Please sign in to comment.