blob: fb247d5dadfe5a5e5600c238b2d6e3e6cac8ebef (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
#pragma once
#include <memory>
namespace search::tensor {
/**
* Interface used to randomly draw the max level a new hnsw node should exist in.
*/
class RandomLevelGenerator {
public:
using UP = std::unique_ptr<RandomLevelGenerator>;
virtual ~RandomLevelGenerator() {}
virtual uint32_t max_level() = 0;
};
}
|