Skip to main content

hnsw_config

Function hnsw_config 

Source
pub fn hnsw_config() -> HnswConfigBuilder
Expand description

Create a new HnswConfig builder with default values

This is a convenience function that creates a builder for constructing HnswConfig instances with validation and sensible defaults.

ยงExamples

use sqlitegraph::hnsw::{hnsw_config, DistanceMetric};

let config = hnsw_config()
    .dimension(256)
    .m_connections(12)
    .distance_metric(DistanceMetric::Euclidean)
    .build()
    .unwrap();