Classes inherited from VectorTransform for c_api (#1869)

Summary:
inherite from  LinearTransform doesn't work here.

Pull Request resolved: https://github.com/facebookresearch/faiss/pull/1869

Reviewed By: beauby

Differential Revision: D28345866

Pulled By: mdouze

fbshipit-source-id: 277dd421213a91c07ed41d7b23002840cc5cfa1f
pull/1888/head
Alexander Andreev 2021-05-12 07:33:45 -07:00 committed by Facebook GitHub Bot
parent d7f9c0ce95
commit a87930111e
3 changed files with 4 additions and 9 deletions

View File

@ -122,9 +122,6 @@ DEFINE_DESTRUCTOR(IndexRefineFlat)
DEFINE_GETTER(IndexRefineFlat, int, own_fields)
DEFINE_SETTER(IndexRefineFlat, int, own_fields)
DEFINE_GETTER(IndexRefineFlat, int, own_refine_index)
DEFINE_SETTER(IndexRefineFlat, int, own_refine_index)
DEFINE_GETTER(IndexRefineFlat, float, k_factor)
DEFINE_SETTER(IndexRefineFlat, float, k_factor)

View File

@ -96,8 +96,6 @@ FAISS_DECLARE_DESTRUCTOR(IndexRefineFlat)
FAISS_DECLARE_GETTER_SETTER(IndexRefineFlat, int, own_fields)
FAISS_DECLARE_GETTER_SETTER(IndexRefineFlat, int, own_refine_index)
/// factor between k requested in search and the k requested from
/// the base_index (should be >= 1)
FAISS_DECLARE_GETTER_SETTER(IndexRefineFlat, float, k_factor)

View File

@ -93,7 +93,7 @@ FAISS_DECLARE_GETTER(LinearTransform, int, have_bias)
/// Getter for is_orthonormal
FAISS_DECLARE_GETTER(LinearTransform, int, is_orthonormal)
FAISS_DECLARE_CLASS_INHERITED(RandomRotationMatrix, LinearTransform)
FAISS_DECLARE_CLASS_INHERITED(RandomRotationMatrix, VectorTransform)
FAISS_DECLARE_DESTRUCTOR(RandomRotationMatrix)
int faiss_RandomRotationMatrix_new_with(
@ -101,7 +101,7 @@ int faiss_RandomRotationMatrix_new_with(
int d_in,
int d_out);
FAISS_DECLARE_CLASS_INHERITED(PCAMatrix, LinearTransform)
FAISS_DECLARE_CLASS_INHERITED(PCAMatrix, VectorTransform)
FAISS_DECLARE_DESTRUCTOR(PCAMatrix)
int faiss_PCAMatrix_new_with(
@ -117,7 +117,7 @@ FAISS_DECLARE_GETTER(PCAMatrix, float, eigen_power)
/// Getter for random_rotation
FAISS_DECLARE_GETTER(PCAMatrix, int, random_rotation)
FAISS_DECLARE_CLASS_INHERITED(ITQMatrix, LinearTransform)
FAISS_DECLARE_CLASS_INHERITED(ITQMatrix, VectorTransform)
FAISS_DECLARE_DESTRUCTOR(ITQMatrix)
int faiss_ITQMatrix_new_with(FaissITQMatrix** p_vt, int d);
@ -134,7 +134,7 @@ int faiss_ITQTransform_new_with(
/// Getter for do_pca
FAISS_DECLARE_GETTER(ITQTransform, int, do_pca)
FAISS_DECLARE_CLASS_INHERITED(OPQMatrix, LinearTransform)
FAISS_DECLARE_CLASS_INHERITED(OPQMatrix, VectorTransform)
FAISS_DECLARE_DESTRUCTOR(OPQMatrix)
int faiss_OPQMatrix_new_with(FaissOPQMatrix** p_vt, int d, int M, int d2);