Skip to content
Snippets Groups Projects
Commit 2b5fe9de authored by Mingchung Xia's avatar Mingchung Xia
Browse files

Minor styling changes

parent 7c3b180e
No related branches found
No related tags found
1 merge request!13HNSW Implementation with Testcases
Pipeline #110563 failed
...@@ -57,8 +57,8 @@ public struct DeterministicSampleVectorIndex<Vector: Collection & Codable> where ...@@ -57,8 +57,8 @@ public struct DeterministicSampleVectorIndex<Vector: Collection & Codable> where
let convertedVector: [Double] = vector.map{ Double($0) } let convertedVector: [Double] = vector.map{ Double($0) }
if let metricVector = convertedVector as? CartesianDistanceMetric<Vector>.Vector { if let metricVector = convertedVector as? CartesianDistanceMetric<Vector>.Vector {
/// base.insert will returns an unused 'Key' type but will implicitly modify base /// base.insert will returns an unused 'Key' type but will implicitly modify base
let key = base.insert(metricVector, using: &srng) let _ = base.insert(metricVector, using: &srng)
// let key = base.insert(metricVector, using: &drng) // let _ = base.insert(metricVector, using: &drng)
} else { } else {
fatalError("Unable to get metric vector") fatalError("Unable to get metric vector")
} }
......
...@@ -84,7 +84,7 @@ final class HNSWTests: XCTestCase { ...@@ -84,7 +84,7 @@ final class HNSWTests: XCTestCase {
corpus.addUntokenizedDocument(text) corpus.addUntokenizedDocument(text)
} }
} }
//print("Loaded \(corpus.encodedDocuments.count) documents.") //print("Loaded \(corpus.encodedDocuments.base.vectors.count) documents.")
XCTAssert(corpus.encodedDocuments.base.vectors.count == 17999) XCTAssert(corpus.encodedDocuments.base.vectors.count == 17999)
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment