INNER CODE UNIT · Swift

SimilarityIndex

ZachNagengast/similarity-search-kit · Sources/SimilaritySearchKit/Core/Index/SimilarityIndex.swift:20

public class SimilarityIndex: Identifiable, Hashable {
    // MARK: - Properties

    /// Unique identifier for this index instance
    public var id: UUID = .init()
    public static func == (lhs: SimilarityIndex, rhs: SimilarityIndex) -> Bool {
        return lhs.id == rhs.id
    }

    public func hash(into hasher: inout Hasher) {
        hasher.combine(id)
    }

    /// The items stored in the index.
    public var indexItems: [IndexItem] = []

    /// The dimension of the embeddings in the index.
    /// Used to validate emebdding updates

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…