Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ all-features = false

[dependencies]
rayon = "1.10"
serde = { version = "1.0", features = ["derive"], optional = true }

[dev-dependencies]
# Test/bench corpora are seeded with these; not needed by the library.
Expand All @@ -78,6 +79,7 @@ rand_chacha = "0.10"
# target takes the scalar fallback. `experimental` exposes MultiBucketBitmap
# (research scaffold), kept off the stable surface.
experimental = []
serde = ["dep:serde"]
# `test-utils` exposes internal dispatch probes used by the crate's own integration
# tests (e.g. the allocation-free guarantee check). Gated off the default surface
# because these helpers are not part of the public API and carry no semver guarantee.
Expand Down
2 changes: 1 addition & 1 deletion docs/msrv-and-features.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ any migration note.

| Surface | Default features | Stable default-off features | Optional dependency features | Experimental/internal features |
| --- | --- | --- | --- | --- |
| `ordvec` | none | none | none | `experimental` exposes `MultiBucketBitmap`; `test-utils` is repo-test-only and has no public stability promise. |
| `ordvec` | none | `serde` derives `Serialize`/`Deserialize` for `SearchResults` only | `serde` | `experimental` exposes `MultiBucketBitmap`; `test-utils` is repo-test-only and has no public stability promise. |
| `ordvec-manifest` | none | none | `cli`, `sqlite`, `sqlite-bundled` | none |
| `ordvec-python` | n/a | n/a | n/a | n/a |
| `ordvec-manifest-python` | n/a | n/a | n/a | n/a |
Expand Down
11 changes: 11 additions & 0 deletions src/bitmap.rs
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,17 @@ pub struct Bitmap {
bitmaps: Vec<u64>,
}

impl std::fmt::Debug for Bitmap {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
f.debug_struct("Bitmap")
.field("dim", &self.dim)
.field("n_top", &self.n_top)
.field("n_vectors", &self.n_vectors)
.field("bytes_per_vector", &self.bytes_per_vec())
.finish()
}
}

impl Bitmap {
pub fn validate_params(dim: usize, n_top: usize) -> Result<(), OrdvecError> {
if dim == 0 {
Expand Down
9 changes: 9 additions & 0 deletions src/fastscan.rs
Original file line number Diff line number Diff line change
Expand Up @@ -534,6 +534,15 @@ pub struct RankQuantFastscan {
packed_fs: Vec<u8>,
}

impl std::fmt::Debug for RankQuantFastscan {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
f.debug_struct("RankQuantFastscan")
.field("dim", &self.dim)
.field("n_vectors", &self.n_vectors)
.finish()
}
}

impl RankQuantFastscan {
/// Construct an empty FastScan b=2 index.
///
Expand Down
Loading
Loading