Package org.zvec.binding
Class IvfQueryParams
java.lang.Object
org.zvec.binding.IvfQueryParams
- All Implemented Interfaces:
AutoCloseable
High-level wrapper for
zvec_ivf_query_params_t (IVF search
parameters).
Ownership: passing an instance to
VectorQuery.setIVFParams(IvfQueryParams),
GroupByVectorQuery.setIVFParams(IvfQueryParams) or
SubQuery.setIVFParams(IvfQueryParams) transfers ownership to the
query (mirroring the C API), and the wrapper becomes inert; close()
afterwards is a no-op.
-
Constructor Summary
ConstructorsConstructorDescriptionCreate IVF query parameters with the C API defaults (nprobe=10).IvfQueryParams(int nprobe, boolean isUsingRefiner, float scaleFactor) Create IVF query parameters. -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()voiddestroy()booleanbooleanintfloatfloatGet the candidate expansion factor used by the refiner.voidsetIsLinear(boolean isLinear) voidsetIsUsingRefiner(boolean isUsingRefiner) voidsetNprobe(int nprobe) voidsetRadius(float radius) voidsetScaleFactor(float scaleFactor) Set the candidate expansion factor used by the refiner.
-
Constructor Details
-
IvfQueryParams
public IvfQueryParams()Create IVF query parameters with the C API defaults (nprobe=10). -
IvfQueryParams
public IvfQueryParams(int nprobe, boolean isUsingRefiner, float scaleFactor) Create IVF query parameters.- Parameters:
nprobe- number of clusters to probeisUsingRefiner- whether to use the refinerscaleFactor- candidate expansion factor used by the refiner
-
-
Method Details
-
setNprobe
public void setNprobe(int nprobe) -
getNprobe
public int getNprobe() -
setScaleFactor
public void setScaleFactor(float scaleFactor) Set the candidate expansion factor used by the refiner. -
getScaleFactor
public float getScaleFactor()Get the candidate expansion factor used by the refiner. -
setRadius
public void setRadius(float radius) -
getRadius
public float getRadius() -
setIsLinear
public void setIsLinear(boolean isLinear) -
getIsLinear
public boolean getIsLinear() -
setIsUsingRefiner
public void setIsUsingRefiner(boolean isUsingRefiner) -
getIsUsingRefiner
public boolean getIsUsingRefiner() -
destroy
public void destroy() -
close
public void close()- Specified by:
closein interfaceAutoCloseable
-