github.com/weaviate/weaviate@v1.24.6/adapters/repos/db/vector/hnsw/distancer/provider.go (about) 1 // _ _ 2 // __ _____ __ ___ ___ __ _| |_ ___ 3 // \ \ /\ / / _ \/ _` \ \ / / |/ _` | __/ _ \ 4 // \ V V / __/ (_| |\ V /| | (_| | || __/ 5 // \_/\_/ \___|\__,_| \_/ |_|\__,_|\__\___| 6 // 7 // Copyright © 2016 - 2024 Weaviate B.V. All rights reserved. 8 // 9 // CONTACT: hello@weaviate.io 10 // 11 12 package distancer 13 14 type Provider interface { 15 New(vec []float32) Distancer 16 SingleDist(vec1, vec2 []float32) (float32, bool, error) 17 Step(x, y []float32) float32 18 Wrap(x float32) float32 19 Type() string 20 } 21 22 type Distancer interface { 23 Distance(vec []float32) (float32, bool, error) 24 }