cvx_index/
lib.rs

1//! # `cvx-index` — Temporal Index Engine for ChronosVector.
2//!
3//! This crate provides distance computation and index structures for
4//! temporal vector search.
5//!
6//! ## Layer 1: Distance Kernels
7//!
8//! Three SIMD-accelerated distance metrics via [`pulp`]:
9//! - [`metrics::CosineDistance`] — angular distance, range `[0.0, 2.0]`
10//! - [`metrics::L2Distance`] — Euclidean distance squared
11//! - [`metrics::DotProductDistance`] — negative dot product (for max inner product search)
12//!
13//! All implement [`cvx_core::DistanceMetric`] and automatically dispatch to
14//! the best SIMD instruction set available at runtime (AVX-512, AVX2, NEON, or scalar).
15//!
16//! ## Layer 4: Spatiotemporal Index (ST-HNSW)
17//!
18//! [`hnsw::TemporalHnsw`] — temporal-aware HNSW with Roaring Bitmap pre-filtering,
19//! composite distance $d_{ST} = \alpha \cdot d_{sem} + (1-\alpha) \cdot d_{time}$,
20//! and trajectory retrieval.
21
22#![deny(unsafe_code)]
23#![warn(missing_docs)]
24
25pub mod hnsw;
26pub mod metrics;