• Sergei Golubchik's avatar
    mhnsw: refactor FVector* classes · 25b345e6
    Sergei Golubchik authored
    Now there's an FVector class which is a pure vector, an array of floats.
    It doesn't necessarily corresponds to a row in the table, and usually
    there is only one FVector instance - the one we're searching for.
    
    And there's an FVectorNode class, which is a node in the graph.
    It has a ref (identifying a row in the source table), possibly an array
    of floats (or not — in which case it will be read lazily from the
    source table as needed). There are many FVectorNodes and they're
    cached to avoid re-reading them from the disk.
    25b345e6
vector_mhnsw.cc 22 KB