//! Vector operations and HNSW index implementation
//!
//! This module provides vector storage and similarity search functionality:
//!
//! - `distance` - Distance calculation with SIMD optimizations
//! - `hnsw` - HNSW index implementation (split into submodules)
//! - `quantizer` - Vector compression (PQ and SQ)
//! - `concurrent` - High-concurrency sharded HNSW index

pub mod distance;
pub mod embedding;
pub mod hnsw;
pub mod quantizer;
pub mod concurrent;
pub mod filter;

pub use distance::{Distance, DistanceCalculator, SimdCapabilities};

// Phase-66: GPU-accelerated batch distance computation
#[cfg(feature = "candle")]
pub use distance::gpu_batch::{batch_distances, batch_distances_with_selector, BatchDistanceResult};
pub use hnsw::{
    HNSWIndex, HNSWError, HNSWPersisted, 
    // P0-3: Transaction types
    Operation, Transaction, TransactionState, Savepoint,
    // P1-1: PQ integration types
    PQHNSWConfig, MemoryStats,
    SearchResult,
};
pub use quantizer::{
    // Product Quantization (high compression, ~32x)
    ProductQuantizer, PQConfig, PQError,
    // Scalar Quantization (moderate compression, 4x, higher accuracy)
    ScalarQuantizer, SQConfig, SQError,
};

// Re-export concurrent HNSW types
pub use concurrent::{
    ConcurrentHNSWIndex, ConcurrentHNSWConfig,
    VectorWriteResult, VectorShardError, VectorSearchResult,
};

// Re-export filter types
pub use filter::{MetadataFilter, FilterOp};

// Re-export embedding types
pub use embedding::{
    EmbeddingEngine, EmbeddingRegistry, EmbeddingCache, EmbeddingCacheConfig,
    EmbeddingError, EmbeddingResult, EmbeddingEngineInfo,
    FieldMapping, CacheStats, MockEmbeddingEngine,
};
