//! HNSW (Hierarchical Navigable Small World) Index Implementation
//!
//! A high-performance approximate nearest neighbor search index based on
//! the paper "Efficient and robust approximate nearest neighbor search using
//! Hierarchical Navigable Small World graphs" by Malkov and Yashunin.
//!
//! Features:
//! - P0-1: Persistence (save/load)
//! - P0-2: Soft delete with compaction
//! - P0-3: Transaction support with rollback
//! - P1-1: Product Quantization integration (optional)
//!
//! # Module Structure
//!
//! - `types` - Type definitions, errors, and configuration structures
//! - `node` - Node storage and fine-grained locking
//! - `index` - Core HNSWIndex implementation
//! - `persistence` - Save/load functionality
//! - `transaction` - Transaction support with savepoints
//! - `pq` - Product Quantization integration

pub mod types;
pub mod node;
pub mod index;
pub mod persistence;
pub mod transaction;
pub mod pq;

#[cfg(test)]
mod tests;

// Re-export main types for convenience
pub use types::{
    // Transaction types
    Operation,
    Transaction,
    TransactionState,
    Savepoint,
    // Configuration
    PQHNSWConfig,
    // Results and stats
    SearchResult,
    MemoryStats,
    // Persistence
    HNSWPersisted,
    // Error
    HNSWError,
};

pub use node::HNSWNode;
pub use index::HNSWIndex;
