hnswlib icon indicating copy to clipboard operation
hnswlib copied to clipboard

Problems with InnerProductSpace distance metric

Open zlwu92 opened this issue 1 year ago • 1 comments

Hi,

I am using examples provided in tests/cpp/.

I am trying to add new examples for based on given examples and modify with using cosine metrics for other dataset. When I try to replace the l2space with cosine metrics which I found also provided in hnswlib, image

image For this line, I replace l2space object with ipspace object. However, it gets compile error image

What should be the reason. These two are both sub-classes inhereted from SpaceInterface, why l2space works well while the other one has problems?

zlwu92 avatar Oct 28 '23 16:10 zlwu92