Moved the node structure of Ball Tree into BallTreeNode.cs
Moved the node structure of KD-Tree into KDTreeNode.cs
Search() function for LSH and Linear search is now static since they do not require indexes or any persistent memory
Test: Changed Assert statements to follow the Assert.That() pattern (see NUnit docs)
VectorDatabase.IsDirty bool property renamed to VectorDatabase.HasUnsavedChanges
Functional Additions
SearchService is an abstraction that facilitates searching against all four supported algorithms, and building indexes for KD-Tree and Ball Tree.
Both indexes are built after a database is loaded in VectorDatabase.LoadAsync(),
SearchService.Build() is called five seconds after changes were made to VectorList.
This is enabled on desktop OSes (e.g., Windows, Linux, FreeBSD, macOS) -- For mobile, you'll want to manually call VectorDatabase.RebuildIndex() after you make changes outside of LoadAsync()
📝 Description
Code Improvements
KDTreeSearch.cs
andBallTreeSearch.cs
BallTreeNode.cs
KDTreeNode.cs
Search()
function for LSH and Linear search is now static since they do not require indexes or any persistent memoryAssert.That()
pattern (see NUnit docs)VectorDatabase.IsDirty
bool property renamed toVectorDatabase.HasUnsavedChanges
Functional Additions
SearchService.Build()
is called five seconds after changes were made to VectorList. This is enabled on desktop OSes (e.g., Windows, Linux, FreeBSD, macOS) -- For mobile, you'll want to manually callVectorDatabase.RebuildIndex()
after you make changes outside ofLoadAsync()