using System; using System.Collections.Generic; using System.IO; using System.Linq; using ZeroLevel.HNSW; using ZeroLevel.HNSW.Services.OPT; using ZeroLevel.Services.Serialization; namespace temp2 { class Program { static void Main(string[] args) { SmallWorld world; using (var ms = new FileStream(@"F:\graph_test.bin", FileMode.Open, FileAccess.Read, FileShare.None)) { world = new SmallWorld(NSWOptions.Create(6, 12, 100, 10, Metrics.L2Euclidean, true, true, selectionHeuristic: NeighbourSelectionHeuristic.SelectSimple), ms); } var test_vectors = new List(); using (var ms = new FileStream(@"F:\test_vectors.bin", FileMode.Open, FileAccess.Read, FileShare.None)) { using (var reader = new MemoryStreamReader(ms)) { var count = reader.ReadInt32(); for(int i=0;i world, List test_vectors) { int K = 10; foreach (var v in test_vectors) { var result = world.Search(v, K); Console.WriteLine(result.Count()); } } } }