Skip to content

Commit 917dff1

Browse files
authored
Rename ivf_flat_index_group to ivf_flat_group (#385)
1 parent 00e279c commit 917dff1

File tree

5 files changed

+65
-82
lines changed

5 files changed

+65
-82
lines changed

src/include/index/README/IVF.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ There are four primary classes in the `IVFFlatIndex` design:
44

55
1. `IVFFlatIndex`: The type-erased C++ class interface to an IVF index.
66
2. `ivf_flat_index`: The typed C++ class that implements the IVF index.
7-
3. `ivf_flat_index_group`: The C++ class that represents the TileDB comprising the arrays that make up the IVF index (centroids, partititioned vectors, partitioned ids, index, etc.).
7+
3. `ivf_flat_group`: The C++ class that represents the TileDB comprising the arrays that make up the IVF index (centroids, partititioned vectors, partitioned ids, index, etc.).
88
4. `ivf_flat_index_metadata`: The C++ class that represents the metadata for the group (types of the arrays, history of the group, etc.)
99

1010
## Design Principles
@@ -22,14 +22,14 @@ on a partitioned feature vector array.
2222

2323
The `ivf_flat_index` is simply an inverted index. It is not "aware" of anything
2424
having to do with TileDB arrays, including URIs, groups, arrays, metadata, and the
25-
like. That is all handled by the `ivf_flat_index_group` class.
25+
like. That is all handled by the `ivf_flat_group` class.
2626

27-
The `ivf_flat_index_group` is the interface between the `ivf_flat_index` and the
27+
The `ivf_flat_group` is the interface between the `ivf_flat_index` and the
2828
TileDB index arrays. It contains all of the information necessary to fill the
2929
arrays in an `ivf_flat_index` at a given timestamp.
3030

3131
The `ivf_flat_index_metadata` class encapsulates metadata in a class separate from
32-
`ivf_flat_index_group` for the sake of convenience.
32+
`ivf_flat_group` for the sake of convenience.
3333

3434
## Functionality
3535

@@ -205,7 +205,7 @@ In the non-cloud case, insertions into the `vamana` (graph-based) indexes is ext
205205
206206
### `ivf_flat_index`
207207
208-
### `ivf_flat_index_group`
208+
### `ivf_flat_group`
209209
210210
### `ivf_flat_index_metadata`
211211

src/include/index/ivf_flat_group.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,8 @@
3333
* version of the index.
3434
*/
3535

36-
#ifndef TILEDB_IVF_FLAT_INDEX_GROUP_H
37-
#define TILEDB_IVF_FLAT_INDEX_GROUP_H
36+
#ifndef TILEDB_IVF_FLAT_GROUP_H
37+
#define TILEDB_IVF_FLAT_GROUP_H
3838

3939
#include "index/index_defs.h"
4040
#include "index/index_group.h"
@@ -48,7 +48,7 @@
4848
}}};
4949

5050
template <class index_type>
51-
class ivf_flat_index_group : public base_index_group<index_type> {
51+
class ivf_flat_group : public base_index_group<index_type> {
5252
using Base = base_index_group<index_type>;
5353

5454
using Base::array_key_to_array_name_;
@@ -65,7 +65,7 @@ class ivf_flat_index_group : public base_index_group<index_type> {
6565
static const int32_t tile_size_bytes{64 * 1024 * 1024};
6666

6767
public:
68-
ivf_flat_index_group(
68+
ivf_flat_group(
6969
const tiledb::Context& ctx,
7070
const std::string& uri,
7171
tiledb_query_type_t rw = TILEDB_READ,

src/include/index/ivf_flat_index.h

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ enum class kmeans_init { none, kmeanspp, random };
7373
* Class representing an inverted file (IVF) index for flat (non-compressed)
7474
* feature vectors. The class simply holds the index data itself, it is
7575
* unaware of where the data comes from -- reading and writing data is done
76-
* via an ivf_flat_index_group. Thus, this class does not hold information
76+
* via an ivf_flat_group. Thus, this class does not hold information
7777
* about the group (neither the group members, nor the group metadata).
7878
*
7979
* @tparam partitioned_vectors_feature_type
@@ -92,7 +92,7 @@ class ivf_flat_index {
9292
using score_type = float; // @todo -- this should be a parameter?
9393
using centroid_feature_type = score_type;
9494

95-
using group_type = ivf_flat_index_group<ivf_flat_index>;
95+
using group_type = ivf_flat_group<ivf_flat_index>;
9696
using metadata_type = ivf_flat_index_metadata;
9797

9898
private:
@@ -119,7 +119,7 @@ class ivf_flat_index {
119119
/** The timestamp at which the index was created */
120120
TemporalPolicy temporal_policy_{TimeTravel, 0};
121121

122-
std::unique_ptr<ivf_flat_index_group<ivf_flat_index>> group_;
122+
std::unique_ptr<ivf_flat_group<ivf_flat_index>> group_;
123123

124124
/****************************************************************************
125125
* Index representation
@@ -222,7 +222,7 @@ class ivf_flat_index {
222222
const std::string& uri,
223223
std::optional<TemporalPolicy> temporal_policy = std::nullopt)
224224
: temporal_policy_{temporal_policy.has_value() ? *temporal_policy : TemporalPolicy()}
225-
, group_{std::make_unique<ivf_flat_index_group<ivf_flat_index>>(
225+
, group_{std::make_unique<ivf_flat_group<ivf_flat_index>>(
226226
ctx, uri, TILEDB_READ, temporal_policy_)} {
227227
/**
228228
* Read the centroids. How the partitioned_vectors_ are read in will be
@@ -750,7 +750,7 @@ class ivf_flat_index {
750750
const std::string& group_uri,
751751
const std::string& storage_version = "") const {
752752
// Write the group
753-
auto write_group = ivf_flat_index_group<ivf_flat_index>(
753+
auto write_group = ivf_flat_group<ivf_flat_index>(
754754
ctx,
755755
group_uri,
756756
TILEDB_WRITE,

src/include/test/unit_inner_product_distance.cc

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,6 @@
3434
#include "detail/linalg/matrix.h"
3535
#include "detail/scoring/inner_product.h"
3636

37-
TEST_CASE("inner_product_distance: null test", "[inner_product_distance]") {
38-
}
39-
4037
TEST_CASE(
4138
"inner_product_distance: simple vectors", "[inner_product_distance]") {
4239
auto u = std::vector<uint8_t>{1, 2, 3, 4};

0 commit comments

Comments
 (0)