Delete ann directory

This commit is contained in:
dogemanttv 2024-01-10 17:06:13 -06:00 committed by GitHub
parent 72eda9a24f
commit caa941a9b7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
342 changed files with 0 additions and 28764 deletions

View File

@ -1,15 +0,0 @@
target(
name = "faiss",
dependencies = [
"ann/src/main/java/com/twitter/ann/faiss/swig:swig-artifactory",
],
)
java_library(
name = "swig-native-utils",
sources = ["*.java"],
compiler_option_sets = ["fatal_warnings"],
platform = "java8",
tags = ["bazel-compatible"],
dependencies = [],
)

View File

@ -1,151 +0,0 @@
package com.twitter.ann.faiss;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.InputStream;
import java.nio.file.Files;
import java.nio.file.StandardCopyOption;
import java.util.Locale;
public final class NativeUtils {
private static final int MIN_PREFIX_LENGTH = 3;
public static final String NATIVE_FOLDER_PATH_PREFIX = "nativeutils";
public static File temporaryDir;
private NativeUtils() {
}
private static File unpackLibraryFromJarInternal(String path) throws IOException {
if (null == path || !path.startsWith("/")) {
throw new IllegalArgumentException("The path has to be absolute (start with '/').");
}
String[] parts = path.split("/");
String filename = (parts.length > 1) ? parts[parts.length - 1] : null;
if (filename == null || filename.length() < MIN_PREFIX_LENGTH) {
throw new IllegalArgumentException("The filename has to be at least 3 characters long.");
}
if (temporaryDir == null) {
temporaryDir = createTempDirectory(NATIVE_FOLDER_PATH_PREFIX);
temporaryDir.deleteOnExit();
}
File temp = new File(temporaryDir, filename);
try (InputStream is = NativeUtils.class.getResourceAsStream(path)) {
Files.copy(is, temp.toPath(), StandardCopyOption.REPLACE_EXISTING);
} catch (IOException e) {
temp.delete();
throw e;
} catch (NullPointerException e) {
temp.delete();
throw new FileNotFoundException("File " + path + " was not found inside JAR.");
}
return temp;
}
/**
* Unpack library from JAR into temporary path
*
* @param path The path of file inside JAR as absolute path (beginning with
* '/'), e.g. /package/File.ext
* @throws IOException If temporary file creation or read/write
* operation fails
* @throws IllegalArgumentException If source file (param path) does not exist
* @throws IllegalArgumentException If the path is not absolute or if the
* filename is shorter than three characters
* (restriction of
* {@link File#createTempFile(java.lang.String, java.lang.String)}).
* @throws FileNotFoundException If the file could not be found inside the
* JAR.
*/
public static void unpackLibraryFromJar(String path) throws IOException {
unpackLibraryFromJarInternal(path);
}
/**
* Loads library from current JAR archive
* <p>
* The file from JAR is copied into system temporary directory and then loaded.
* The temporary file is deleted after
* exiting.
* Method uses String as filename because the pathname is "abstract", not
* system-dependent.
*
* @param path The path of file inside JAR as absolute path (beginning with
* '/'), e.g. /package/File.ext
* @throws IOException If temporary file creation or read/write
* operation fails
* @throws IllegalArgumentException If source file (param path) does not exist
* @throws IllegalArgumentException If the path is not absolute or if the
* filename is shorter than three characters
* (restriction of
* {@link File#createTempFile(java.lang.String, java.lang.String)}).
* @throws FileNotFoundException If the file could not be found inside the
* JAR.
*/
public static void loadLibraryFromJar(String path) throws IOException {
File temp = unpackLibraryFromJarInternal(path);
try (InputStream is = NativeUtils.class.getResourceAsStream(path)) {
Files.copy(is, temp.toPath(), StandardCopyOption.REPLACE_EXISTING);
} catch (IOException e) {
temp.delete();
throw e;
} catch (NullPointerException e) {
temp.delete();
throw new FileNotFoundException("File " + path + " was not found inside JAR.");
}
try {
System.load(temp.getAbsolutePath());
} finally {
temp.deleteOnExit();
}
}
private static File createTempDirectory(String prefix) throws IOException {
String tempDir = System.getProperty("java.io.tmpdir");
File generatedDir = new File(tempDir, prefix + System.nanoTime());
if (!generatedDir.mkdir()) {
throw new IOException("Failed to create temp directory " + generatedDir.getName());
}
return generatedDir;
}
public enum OSType {
Windows, MacOS, Linux, Other
}
protected static OSType detectedOS;
/**
* detect the operating system from the os.name System property and cache
* the result
*
* @returns - the operating system detected
*/
public static OSType getOperatingSystemType() {
if (detectedOS == null) {
String osname = System.getProperty("os.name", "generic").toLowerCase(Locale.ENGLISH);
if ((osname.contains("mac")) || (osname.contains("darwin"))) {
detectedOS = OSType.MacOS;
} else if (osname.contains("win")) {
detectedOS = OSType.Windows;
} else if (osname.contains("nux")) {
detectedOS = OSType.Linux;
} else {
detectedOS = OSType.Other;
}
}
return detectedOS;
}
}

View File

@ -1,98 +0,0 @@
/* ----------------------------------------------------------------------------
* This file was automatically generated by SWIG (http://www.swig.org).
* Version 4.0.2
*
* Do not make changes to this file unless you know what you are doing--modify
* the SWIG interface file instead.
* ----------------------------------------------------------------------------- */
package com.twitter.ann.faiss;
public class AlignedTableFloat32 {
private transient long swigCPtr;
protected transient boolean swigCMemOwn;
protected AlignedTableFloat32(long cPtr, boolean cMemoryOwn) {
swigCMemOwn = cMemoryOwn;
swigCPtr = cPtr;
}
protected static long getCPtr(AlignedTableFloat32 obj) {
return (obj == null) ? 0 : obj.swigCPtr;
}
@SuppressWarnings("deprecation")
protected void finalize() {
delete();
}
public synchronized void delete() {
if (swigCPtr != 0) {
if (swigCMemOwn) {
swigCMemOwn = false;
swigfaissJNI.delete_AlignedTableFloat32(swigCPtr);
}
swigCPtr = 0;
}
}
public void setTab(SWIGTYPE_p_faiss__AlignedTableTightAllocT_float_32_t value) {
swigfaissJNI.AlignedTableFloat32_tab_set(swigCPtr, this, SWIGTYPE_p_faiss__AlignedTableTightAllocT_float_32_t.getCPtr(value));
}
public SWIGTYPE_p_faiss__AlignedTableTightAllocT_float_32_t getTab() {
long cPtr = swigfaissJNI.AlignedTableFloat32_tab_get(swigCPtr, this);
return (cPtr == 0) ? null : new SWIGTYPE_p_faiss__AlignedTableTightAllocT_float_32_t(cPtr, false);
}
public void setNumel(long value) {
swigfaissJNI.AlignedTableFloat32_numel_set(swigCPtr, this, value);
}
public long getNumel() {
return swigfaissJNI.AlignedTableFloat32_numel_get(swigCPtr, this);
}
public static long round_capacity(long n) {
return swigfaissJNI.AlignedTableFloat32_round_capacity(n);
}
public AlignedTableFloat32() {
this(swigfaissJNI.new_AlignedTableFloat32__SWIG_0(), true);
}
public AlignedTableFloat32(long n) {
this(swigfaissJNI.new_AlignedTableFloat32__SWIG_1(n), true);
}
public long itemsize() {
return swigfaissJNI.AlignedTableFloat32_itemsize(swigCPtr, this);
}
public void resize(long n) {
swigfaissJNI.AlignedTableFloat32_resize(swigCPtr, this, n);
}
public void clear() {
swigfaissJNI.AlignedTableFloat32_clear(swigCPtr, this);
}
public long size() {
return swigfaissJNI.AlignedTableFloat32_size(swigCPtr, this);
}
public long nbytes() {
return swigfaissJNI.AlignedTableFloat32_nbytes(swigCPtr, this);
}
public SWIGTYPE_p_float get() {
long cPtr = swigfaissJNI.AlignedTableFloat32_get__SWIG_0(swigCPtr, this);
return (cPtr == 0) ? null : new SWIGTYPE_p_float(cPtr, false);
}
public SWIGTYPE_p_float data() {
long cPtr = swigfaissJNI.AlignedTableFloat32_data__SWIG_0(swigCPtr, this);
return (cPtr == 0) ? null : new SWIGTYPE_p_float(cPtr, false);
}
}

View File

@ -1,98 +0,0 @@
/* ----------------------------------------------------------------------------
* This file was automatically generated by SWIG (http://www.swig.org).
* Version 4.0.2
*
* Do not make changes to this file unless you know what you are doing--modify
* the SWIG interface file instead.
* ----------------------------------------------------------------------------- */
package com.twitter.ann.faiss;
public class AlignedTableUint16 {
private transient long swigCPtr;
protected transient boolean swigCMemOwn;
protected AlignedTableUint16(long cPtr, boolean cMemoryOwn) {
swigCMemOwn = cMemoryOwn;
swigCPtr = cPtr;
}
protected static long getCPtr(AlignedTableUint16 obj) {
return (obj == null) ? 0 : obj.swigCPtr;
}
@SuppressWarnings("deprecation")
protected void finalize() {
delete();
}
public synchronized void delete() {
if (swigCPtr != 0) {
if (swigCMemOwn) {
swigCMemOwn = false;
swigfaissJNI.delete_AlignedTableUint16(swigCPtr);
}
swigCPtr = 0;
}
}
public void setTab(SWIGTYPE_p_faiss__AlignedTableTightAllocT_uint16_t_32_t value) {
swigfaissJNI.AlignedTableUint16_tab_set(swigCPtr, this, SWIGTYPE_p_faiss__AlignedTableTightAllocT_uint16_t_32_t.getCPtr(value));
}
public SWIGTYPE_p_faiss__AlignedTableTightAllocT_uint16_t_32_t getTab() {
long cPtr = swigfaissJNI.AlignedTableUint16_tab_get(swigCPtr, this);
return (cPtr == 0) ? null : new SWIGTYPE_p_faiss__AlignedTableTightAllocT_uint16_t_32_t(cPtr, false);
}
public void setNumel(long value) {
swigfaissJNI.AlignedTableUint16_numel_set(swigCPtr, this, value);
}
public long getNumel() {
return swigfaissJNI.AlignedTableUint16_numel_get(swigCPtr, this);
}
public static long round_capacity(long n) {
return swigfaissJNI.AlignedTableUint16_round_capacity(n);
}
public AlignedTableUint16() {
this(swigfaissJNI.new_AlignedTableUint16__SWIG_0(), true);
}
public AlignedTableUint16(long n) {
this(swigfaissJNI.new_AlignedTableUint16__SWIG_1(n), true);
}
public long itemsize() {
return swigfaissJNI.AlignedTableUint16_itemsize(swigCPtr, this);
}
public void resize(long n) {
swigfaissJNI.AlignedTableUint16_resize(swigCPtr, this, n);
}
public void clear() {
swigfaissJNI.AlignedTableUint16_clear(swigCPtr, this);
}
public long size() {
return swigfaissJNI.AlignedTableUint16_size(swigCPtr, this);
}
public long nbytes() {
return swigfaissJNI.AlignedTableUint16_nbytes(swigCPtr, this);
}
public SWIGTYPE_p_uint16_t get() {
long cPtr = swigfaissJNI.AlignedTableUint16_get__SWIG_0(swigCPtr, this);
return (cPtr == 0) ? null : new SWIGTYPE_p_uint16_t(cPtr, false);
}
public SWIGTYPE_p_uint16_t data() {
long cPtr = swigfaissJNI.AlignedTableUint16_data__SWIG_0(swigCPtr, this);
return (cPtr == 0) ? null : new SWIGTYPE_p_uint16_t(cPtr, false);
}
}

View File

@ -1,98 +0,0 @@
/* ----------------------------------------------------------------------------
* This file was automatically generated by SWIG (http://www.swig.org).
* Version 4.0.2
*
* Do not make changes to this file unless you know what you are doing--modify
* the SWIG interface file instead.
* ----------------------------------------------------------------------------- */
package com.twitter.ann.faiss;
public class AlignedTableUint8 {
private transient long swigCPtr;
protected transient boolean swigCMemOwn;
protected AlignedTableUint8(long cPtr, boolean cMemoryOwn) {
swigCMemOwn = cMemoryOwn;
swigCPtr = cPtr;
}
protected static long getCPtr(AlignedTableUint8 obj) {
return (obj == null) ? 0 : obj.swigCPtr;
}
@SuppressWarnings("deprecation")
protected void finalize() {
delete();
}
public synchronized void delete() {
if (swigCPtr != 0) {
if (swigCMemOwn) {
swigCMemOwn = false;
swigfaissJNI.delete_AlignedTableUint8(swigCPtr);
}
swigCPtr = 0;
}
}
public void setTab(SWIGTYPE_p_faiss__AlignedTableTightAllocT_unsigned_char_32_t value) {
swigfaissJNI.AlignedTableUint8_tab_set(swigCPtr, this, SWIGTYPE_p_faiss__AlignedTableTightAllocT_unsigned_char_32_t.getCPtr(value));
}
public SWIGTYPE_p_faiss__AlignedTableTightAllocT_unsigned_char_32_t getTab() {
long cPtr = swigfaissJNI.AlignedTableUint8_tab_get(swigCPtr, this);
return (cPtr == 0) ? null : new SWIGTYPE_p_faiss__AlignedTableTightAllocT_unsigned_char_32_t(cPtr, false);
}
public void setNumel(long value) {
swigfaissJNI.AlignedTableUint8_numel_set(swigCPtr, this, value);
}
public long getNumel() {
return swigfaissJNI.AlignedTableUint8_numel_get(swigCPtr, this);
}
public static long round_capacity(long n) {
return swigfaissJNI.AlignedTableUint8_round_capacity(n);
}
public AlignedTableUint8() {
this(swigfaissJNI.new_AlignedTableUint8__SWIG_0(), true);
}
public AlignedTableUint8(long n) {
this(swigfaissJNI.new_AlignedTableUint8__SWIG_1(n), true);
}
public long itemsize() {
return swigfaissJNI.AlignedTableUint8_itemsize(swigCPtr, this);
}
public void resize(long n) {
swigfaissJNI.AlignedTableUint8_resize(swigCPtr, this, n);
}
public void clear() {
swigfaissJNI.AlignedTableUint8_clear(swigCPtr, this);
}
public long size() {
return swigfaissJNI.AlignedTableUint8_size(swigCPtr, this);
}
public long nbytes() {
return swigfaissJNI.AlignedTableUint8_nbytes(swigCPtr, this);
}
public SWIGTYPE_p_unsigned_char get() {
long cPtr = swigfaissJNI.AlignedTableUint8_get__SWIG_0(swigCPtr, this);
return (cPtr == 0) ? null : new SWIGTYPE_p_unsigned_char(cPtr, false);
}
public SWIGTYPE_p_unsigned_char data() {
long cPtr = swigfaissJNI.AlignedTableUint8_data__SWIG_0(swigCPtr, this);
return (cPtr == 0) ? null : new SWIGTYPE_p_unsigned_char(cPtr, false);
}
}

View File

@ -1,86 +0,0 @@
/* ----------------------------------------------------------------------------
* This file was automatically generated by SWIG (http://www.swig.org).
* Version 4.0.2
*
* Do not make changes to this file unless you know what you are doing--modify
* the SWIG interface file instead.
* ----------------------------------------------------------------------------- */
package com.twitter.ann.faiss;
public class ArrayInvertedLists extends InvertedLists {
private transient long swigCPtr;
protected ArrayInvertedLists(long cPtr, boolean cMemoryOwn) {
super(swigfaissJNI.ArrayInvertedLists_SWIGUpcast(cPtr), cMemoryOwn);
swigCPtr = cPtr;
}
protected static long getCPtr(ArrayInvertedLists obj) {
return (obj == null) ? 0 : obj.swigCPtr;
}
@SuppressWarnings("deprecation")
protected void finalize() {
delete();
}
public synchronized void delete() {
if (swigCPtr != 0) {
if (swigCMemOwn) {
swigCMemOwn = false;
swigfaissJNI.delete_ArrayInvertedLists(swigCPtr);
}
swigCPtr = 0;
}
super.delete();
}
public void setCodes(ByteVectorVector value) {
swigfaissJNI.ArrayInvertedLists_codes_set(swigCPtr, this, ByteVectorVector.getCPtr(value), value);
}
public ByteVectorVector getCodes() {
long cPtr = swigfaissJNI.ArrayInvertedLists_codes_get(swigCPtr, this);
return (cPtr == 0) ? null : new ByteVectorVector(cPtr, false);
}
public void setIds(SWIGTYPE_p_std__vectorT_std__vectorT_int64_t_t_t value) {
swigfaissJNI.ArrayInvertedLists_ids_set(swigCPtr, this, SWIGTYPE_p_std__vectorT_std__vectorT_int64_t_t_t.getCPtr(value));
}
public SWIGTYPE_p_std__vectorT_std__vectorT_int64_t_t_t getIds() {
long cPtr = swigfaissJNI.ArrayInvertedLists_ids_get(swigCPtr, this);
return (cPtr == 0) ? null : new SWIGTYPE_p_std__vectorT_std__vectorT_int64_t_t_t(cPtr, false);
}
public ArrayInvertedLists(long nlist, long code_size) {
this(swigfaissJNI.new_ArrayInvertedLists(nlist, code_size), true);
}
public long list_size(long list_no) {
return swigfaissJNI.ArrayInvertedLists_list_size(swigCPtr, this, list_no);
}
public SWIGTYPE_p_unsigned_char get_codes(long list_no) {
long cPtr = swigfaissJNI.ArrayInvertedLists_get_codes(swigCPtr, this, list_no);
return (cPtr == 0) ? null : new SWIGTYPE_p_unsigned_char(cPtr, false);
}
public LongVector get_ids(long list_no) {
return new LongVector(swigfaissJNI.ArrayInvertedLists_get_ids(swigCPtr, this, list_no), false);
}
public long add_entries(long list_no, long n_entry, LongVector ids, SWIGTYPE_p_unsigned_char code) {
return swigfaissJNI.ArrayInvertedLists_add_entries(swigCPtr, this, list_no, n_entry, SWIGTYPE_p_long_long.getCPtr(ids.data()), ids, SWIGTYPE_p_unsigned_char.getCPtr(code));
}
public void update_entries(long list_no, long offset, long n_entry, LongVector ids, SWIGTYPE_p_unsigned_char code) {
swigfaissJNI.ArrayInvertedLists_update_entries(swigCPtr, this, list_no, offset, n_entry, SWIGTYPE_p_long_long.getCPtr(ids.data()), ids, SWIGTYPE_p_unsigned_char.getCPtr(code));
}
public void resize(long list_no, long new_size) {
swigfaissJNI.ArrayInvertedLists_resize(swigCPtr, this, list_no, new_size);
}
}

View File

@ -1,89 +0,0 @@
/* ----------------------------------------------------------------------------
* This file was automatically generated by SWIG (http://www.swig.org).
* Version 4.0.2
*
* Do not make changes to this file unless you know what you are doing--modify
* the SWIG interface file instead.
* ----------------------------------------------------------------------------- */
package com.twitter.ann.faiss;
public class AutoTuneCriterion {
private transient long swigCPtr;
protected transient boolean swigCMemOwn;
protected AutoTuneCriterion(long cPtr, boolean cMemoryOwn) {
swigCMemOwn = cMemoryOwn;
swigCPtr = cPtr;
}
protected static long getCPtr(AutoTuneCriterion obj) {
return (obj == null) ? 0 : obj.swigCPtr;
}
@SuppressWarnings("deprecation")
protected void finalize() {
delete();
}
public synchronized void delete() {
if (swigCPtr != 0) {
if (swigCMemOwn) {
swigCMemOwn = false;
swigfaissJNI.delete_AutoTuneCriterion(swigCPtr);
}
swigCPtr = 0;
}
}
public void setNq(long value) {
swigfaissJNI.AutoTuneCriterion_nq_set(swigCPtr, this, value);
}
public long getNq() {
return swigfaissJNI.AutoTuneCriterion_nq_get(swigCPtr, this);
}
public void setNnn(long value) {
swigfaissJNI.AutoTuneCriterion_nnn_set(swigCPtr, this, value);
}
public long getNnn() {
return swigfaissJNI.AutoTuneCriterion_nnn_get(swigCPtr, this);
}
public void setGt_nnn(long value) {
swigfaissJNI.AutoTuneCriterion_gt_nnn_set(swigCPtr, this, value);
}
public long getGt_nnn() {
return swigfaissJNI.AutoTuneCriterion_gt_nnn_get(swigCPtr, this);
}
public void setGt_D(FloatVector value) {
swigfaissJNI.AutoTuneCriterion_gt_D_set(swigCPtr, this, FloatVector.getCPtr(value), value);
}
public FloatVector getGt_D() {
long cPtr = swigfaissJNI.AutoTuneCriterion_gt_D_get(swigCPtr, this);
return (cPtr == 0) ? null : new FloatVector(cPtr, false);
}
public void setGt_I(SWIGTYPE_p_std__vectorT_int64_t_t value) {
swigfaissJNI.AutoTuneCriterion_gt_I_set(swigCPtr, this, SWIGTYPE_p_std__vectorT_int64_t_t.getCPtr(value));
}
public SWIGTYPE_p_std__vectorT_int64_t_t getGt_I() {
long cPtr = swigfaissJNI.AutoTuneCriterion_gt_I_get(swigCPtr, this);
return (cPtr == 0) ? null : new SWIGTYPE_p_std__vectorT_int64_t_t(cPtr, false);
}
public void set_groundtruth(int gt_nnn, SWIGTYPE_p_float gt_D_in, LongVector gt_I_in) {
swigfaissJNI.AutoTuneCriterion_set_groundtruth(swigCPtr, this, gt_nnn, SWIGTYPE_p_float.getCPtr(gt_D_in), SWIGTYPE_p_long_long.getCPtr(gt_I_in.data()), gt_I_in);
}
public double evaluate(SWIGTYPE_p_float D, LongVector I) {
return swigfaissJNI.AutoTuneCriterion_evaluate(swigCPtr, this, SWIGTYPE_p_float.getCPtr(D), SWIGTYPE_p_long_long.getCPtr(I.data()), I);
}
}

View File

@ -1,26 +0,0 @@
java_library(
name = "swig-local",
sources = ["*.java"],
compiler_option_sets = ["fatal_warnings"],
platform = "java8",
tags = [
"bazel-compatible",
"bazel-only",
],
dependencies = [
"ann/src/main/java/com/twitter/ann/faiss:swig-native-utils",
"ann/src/main/java/com/twitter/ann/faiss/swig/resources",
],
)
java_library(
name = "swig-artifactory",
sources = ["*.java"],
compiler_option_sets = ["fatal_warnings"],
platform = "java8",
tags = ["bazel-compatible"],
dependencies = [
"3rdparty/jvm/com/twitter/ann/faiss/swig:resources",
"ann/src/main/java/com/twitter/ann/faiss:swig-native-utils",
],
)

View File

@ -1,72 +0,0 @@
/* ----------------------------------------------------------------------------
* This file was automatically generated by SWIG (http://www.swig.org).
* Version 4.0.2
*
* Do not make changes to this file unless you know what you are doing--modify
* the SWIG interface file instead.
* ----------------------------------------------------------------------------- */
package com.twitter.ann.faiss;
public class BitstringReader {
private transient long swigCPtr;
protected transient boolean swigCMemOwn;
protected BitstringReader(long cPtr, boolean cMemoryOwn) {
swigCMemOwn = cMemoryOwn;
swigCPtr = cPtr;
}
protected static long getCPtr(BitstringReader obj) {
return (obj == null) ? 0 : obj.swigCPtr;
}
@SuppressWarnings("deprecation")
protected void finalize() {
delete();
}
public synchronized void delete() {
if (swigCPtr != 0) {
if (swigCMemOwn) {
swigCMemOwn = false;
swigfaissJNI.delete_BitstringReader(swigCPtr);
}
swigCPtr = 0;
}
}
public void setCode(SWIGTYPE_p_unsigned_char value) {
swigfaissJNI.BitstringReader_code_set(swigCPtr, this, SWIGTYPE_p_unsigned_char.getCPtr(value));
}
public SWIGTYPE_p_unsigned_char getCode() {
long cPtr = swigfaissJNI.BitstringReader_code_get(swigCPtr, this);
return (cPtr == 0) ? null : new SWIGTYPE_p_unsigned_char(cPtr, false);
}
public void setCode_size(long value) {
swigfaissJNI.BitstringReader_code_size_set(swigCPtr, this, value);
}
public long getCode_size() {
return swigfaissJNI.BitstringReader_code_size_get(swigCPtr, this);
}
public void setI(long value) {
swigfaissJNI.BitstringReader_i_set(swigCPtr, this, value);
}
public long getI() {
return swigfaissJNI.BitstringReader_i_get(swigCPtr, this);
}
public BitstringReader(SWIGTYPE_p_unsigned_char code, long code_size) {
this(swigfaissJNI.new_BitstringReader(SWIGTYPE_p_unsigned_char.getCPtr(code), code_size), true);
}
public long read(int nbit) {
return swigfaissJNI.BitstringReader_read(swigCPtr, this, nbit);
}
}

View File

@ -1,72 +0,0 @@
/* ----------------------------------------------------------------------------
* This file was automatically generated by SWIG (http://www.swig.org).
* Version 4.0.2
*
* Do not make changes to this file unless you know what you are doing--modify
* the SWIG interface file instead.
* ----------------------------------------------------------------------------- */
package com.twitter.ann.faiss;
public class BitstringWriter {
private transient long swigCPtr;
protected transient boolean swigCMemOwn;
protected BitstringWriter(long cPtr, boolean cMemoryOwn) {
swigCMemOwn = cMemoryOwn;
swigCPtr = cPtr;
}
protected static long getCPtr(BitstringWriter obj) {
return (obj == null) ? 0 : obj.swigCPtr;
}
@SuppressWarnings("deprecation")
protected void finalize() {
delete();
}
public synchronized void delete() {
if (swigCPtr != 0) {
if (swigCMemOwn) {
swigCMemOwn = false;
swigfaissJNI.delete_BitstringWriter(swigCPtr);
}
swigCPtr = 0;
}
}
public void setCode(SWIGTYPE_p_unsigned_char value) {
swigfaissJNI.BitstringWriter_code_set(swigCPtr, this, SWIGTYPE_p_unsigned_char.getCPtr(value));
}
public SWIGTYPE_p_unsigned_char getCode() {
long cPtr = swigfaissJNI.BitstringWriter_code_get(swigCPtr, this);
return (cPtr == 0) ? null : new SWIGTYPE_p_unsigned_char(cPtr, false);
}
public void setCode_size(long value) {
swigfaissJNI.BitstringWriter_code_size_set(swigCPtr, this, value);
}
public long getCode_size() {
return swigfaissJNI.BitstringWriter_code_size_get(swigCPtr, this);
}
public void setI(long value) {
swigfaissJNI.BitstringWriter_i_set(swigCPtr, this, value);
}
public long getI() {
return swigfaissJNI.BitstringWriter_i_get(swigCPtr, this);
}
public BitstringWriter(SWIGTYPE_p_unsigned_char code, long code_size) {
this(swigfaissJNI.new_BitstringWriter(SWIGTYPE_p_unsigned_char.getCPtr(code), code_size), true);
}
public void write(long x, int nbit) {
swigfaissJNI.BitstringWriter_write(swigCPtr, this, x, nbit);
}
}

View File

@ -1,80 +0,0 @@
/* ----------------------------------------------------------------------------
* This file was automatically generated by SWIG (http://www.swig.org).
* Version 4.0.2
*
* Do not make changes to this file unless you know what you are doing--modify
* the SWIG interface file instead.
* ----------------------------------------------------------------------------- */
package com.twitter.ann.faiss;
public class BufferList {
private transient long swigCPtr;
protected transient boolean swigCMemOwn;
protected BufferList(long cPtr, boolean cMemoryOwn) {
swigCMemOwn = cMemoryOwn;
swigCPtr = cPtr;
}
protected static long getCPtr(BufferList obj) {
return (obj == null) ? 0 : obj.swigCPtr;
}
@SuppressWarnings("deprecation")
protected void finalize() {
delete();
}
public synchronized void delete() {
if (swigCPtr != 0) {
if (swigCMemOwn) {
swigCMemOwn = false;
swigfaissJNI.delete_BufferList(swigCPtr);
}
swigCPtr = 0;
}
}
public void setBuffer_size(long value) {
swigfaissJNI.BufferList_buffer_size_set(swigCPtr, this, value);
}
public long getBuffer_size() {
return swigfaissJNI.BufferList_buffer_size_get(swigCPtr, this);
}
public void setBuffers(SWIGTYPE_p_std__vectorT_faiss__BufferList__Buffer_t value) {
swigfaissJNI.BufferList_buffers_set(swigCPtr, this, SWIGTYPE_p_std__vectorT_faiss__BufferList__Buffer_t.getCPtr(value));
}
public SWIGTYPE_p_std__vectorT_faiss__BufferList__Buffer_t getBuffers() {
long cPtr = swigfaissJNI.BufferList_buffers_get(swigCPtr, this);
return (cPtr == 0) ? null : new SWIGTYPE_p_std__vectorT_faiss__BufferList__Buffer_t(cPtr, false);
}
public void setWp(long value) {
swigfaissJNI.BufferList_wp_set(swigCPtr, this, value);
}
public long getWp() {
return swigfaissJNI.BufferList_wp_get(swigCPtr, this);
}
public BufferList(long buffer_size) {
this(swigfaissJNI.new_BufferList(buffer_size), true);
}
public void append_buffer() {
swigfaissJNI.BufferList_append_buffer(swigCPtr, this);
}
public void add(long id, float dis) {
swigfaissJNI.BufferList_add(swigCPtr, this, id, dis);
}
public void copy_range(long ofs, long n, LongVector dest_ids, SWIGTYPE_p_float dest_dis) {
swigfaissJNI.BufferList_copy_range(swigCPtr, this, ofs, n, SWIGTYPE_p_long_long.getCPtr(dest_ids.data()), dest_ids, SWIGTYPE_p_float.getCPtr(dest_dis));
}
}

View File

@ -1,76 +0,0 @@
/* ----------------------------------------------------------------------------
* This file was automatically generated by SWIG (http://www.swig.org).
* Version 4.0.2
*
* Do not make changes to this file unless you know what you are doing--modify
* the SWIG interface file instead.
* ----------------------------------------------------------------------------- */
package com.twitter.ann.faiss;
public class ByteVector {
private transient long swigCPtr;
protected transient boolean swigCMemOwn;
protected ByteVector(long cPtr, boolean cMemoryOwn) {
swigCMemOwn = cMemoryOwn;
swigCPtr = cPtr;
}
protected static long getCPtr(ByteVector obj) {
return (obj == null) ? 0 : obj.swigCPtr;
}
@SuppressWarnings("deprecation")
protected void finalize() {
delete();
}
public synchronized void delete() {
if (swigCPtr != 0) {
if (swigCMemOwn) {
swigCMemOwn = false;
swigfaissJNI.delete_ByteVector(swigCPtr);
}
swigCPtr = 0;
}
}
public ByteVector() {
this(swigfaissJNI.new_ByteVector(), true);
}
public void push_back(short arg0) {
swigfaissJNI.ByteVector_push_back(swigCPtr, this, arg0);
}
public void clear() {
swigfaissJNI.ByteVector_clear(swigCPtr, this);
}
public SWIGTYPE_p_unsigned_char data() {
long cPtr = swigfaissJNI.ByteVector_data(swigCPtr, this);
return (cPtr == 0) ? null : new SWIGTYPE_p_unsigned_char(cPtr, false);
}
public long size() {
return swigfaissJNI.ByteVector_size(swigCPtr, this);
}
public short at(long n) {
return swigfaissJNI.ByteVector_at(swigCPtr, this, n);
}
public void resize(long n) {
swigfaissJNI.ByteVector_resize(swigCPtr, this, n);
}
public void reserve(long n) {
swigfaissJNI.ByteVector_reserve(swigCPtr, this, n);
}
public void swap(ByteVector other) {
swigfaissJNI.ByteVector_swap(swigCPtr, this, ByteVector.getCPtr(other), other);
}
}

View File

@ -1,76 +0,0 @@
/* ----------------------------------------------------------------------------
* This file was automatically generated by SWIG (http://www.swig.org).
* Version 4.0.2
*
* Do not make changes to this file unless you know what you are doing--modify
* the SWIG interface file instead.
* ----------------------------------------------------------------------------- */
package com.twitter.ann.faiss;
public class ByteVectorVector {
private transient long swigCPtr;
protected transient boolean swigCMemOwn;
protected ByteVectorVector(long cPtr, boolean cMemoryOwn) {
swigCMemOwn = cMemoryOwn;
swigCPtr = cPtr;
}
protected static long getCPtr(ByteVectorVector obj) {
return (obj == null) ? 0 : obj.swigCPtr;
}
@SuppressWarnings("deprecation")
protected void finalize() {
delete();
}
public synchronized void delete() {
if (swigCPtr != 0) {
if (swigCMemOwn) {
swigCMemOwn = false;
swigfaissJNI.delete_ByteVectorVector(swigCPtr);
}
swigCPtr = 0;
}
}
public ByteVectorVector() {
this(swigfaissJNI.new_ByteVectorVector(), true);
}
public void push_back(ByteVector arg0) {
swigfaissJNI.ByteVectorVector_push_back(swigCPtr, this, ByteVector.getCPtr(arg0), arg0);
}
public void clear() {
swigfaissJNI.ByteVectorVector_clear(swigCPtr, this);
}
public ByteVector data() {
long cPtr = swigfaissJNI.ByteVectorVector_data(swigCPtr, this);
return (cPtr == 0) ? null : new ByteVector(cPtr, false);
}
public long size() {
return swigfaissJNI.ByteVectorVector_size(swigCPtr, this);
}
public ByteVector at(long n) {
return new ByteVector(swigfaissJNI.ByteVectorVector_at(swigCPtr, this, n), true);
}
public void resize(long n) {
swigfaissJNI.ByteVectorVector_resize(swigCPtr, this, n);
}
public void reserve(long n) {
swigfaissJNI.ByteVectorVector_reserve(swigCPtr, this, n);
}
public void swap(ByteVectorVector other) {
swigfaissJNI.ByteVectorVector_swap(swigCPtr, this, ByteVectorVector.getCPtr(other), other);
}
}

View File

@ -1,68 +0,0 @@
/* ----------------------------------------------------------------------------
* This file was automatically generated by SWIG (http://www.swig.org).
* Version 4.0.2
*
* Do not make changes to this file unless you know what you are doing--modify
* the SWIG interface file instead.
* ----------------------------------------------------------------------------- */
package com.twitter.ann.faiss;
public class CenteringTransform extends VectorTransform {
private transient long swigCPtr;
protected CenteringTransform(long cPtr, boolean cMemoryOwn) {
super(swigfaissJNI.CenteringTransform_SWIGUpcast(cPtr), cMemoryOwn);
swigCPtr = cPtr;
}
protected static long getCPtr(CenteringTransform obj) {
return (obj == null) ? 0 : obj.swigCPtr;
}
@SuppressWarnings("deprecation")
protected void finalize() {
delete();
}
public synchronized void delete() {
if (swigCPtr != 0) {
if (swigCMemOwn) {
swigCMemOwn = false;
swigfaissJNI.delete_CenteringTransform(swigCPtr);
}
swigCPtr = 0;
}
super.delete();
}
public void setMean(FloatVector value) {
swigfaissJNI.CenteringTransform_mean_set(swigCPtr, this, FloatVector.getCPtr(value), value);
}
public FloatVector getMean() {
long cPtr = swigfaissJNI.CenteringTransform_mean_get(swigCPtr, this);
return (cPtr == 0) ? null : new FloatVector(cPtr, false);
}
public CenteringTransform(int d) {
this(swigfaissJNI.new_CenteringTransform__SWIG_0(d), true);
}
public CenteringTransform() {
this(swigfaissJNI.new_CenteringTransform__SWIG_1(), true);
}
public void train(long n, SWIGTYPE_p_float x) {
swigfaissJNI.CenteringTransform_train(swigCPtr, this, n, SWIGTYPE_p_float.getCPtr(x));
}
public void apply_noalloc(long n, SWIGTYPE_p_float x, SWIGTYPE_p_float xt) {
swigfaissJNI.CenteringTransform_apply_noalloc(swigCPtr, this, n, SWIGTYPE_p_float.getCPtr(x), SWIGTYPE_p_float.getCPtr(xt));
}
public void reverse_transform(long n, SWIGTYPE_p_float xt, SWIGTYPE_p_float x) {
swigfaissJNI.CenteringTransform_reverse_transform(swigCPtr, this, n, SWIGTYPE_p_float.getCPtr(xt), SWIGTYPE_p_float.getCPtr(x));
}
}

View File

@ -1,75 +0,0 @@
/* ----------------------------------------------------------------------------
* This file was automatically generated by SWIG (http://www.swig.org).
* Version 4.0.2
*
* Do not make changes to this file unless you know what you are doing--modify
* the SWIG interface file instead.
* ----------------------------------------------------------------------------- */
package com.twitter.ann.faiss;
public class CharVector {
private transient long swigCPtr;
protected transient boolean swigCMemOwn;
protected CharVector(long cPtr, boolean cMemoryOwn) {
swigCMemOwn = cMemoryOwn;
swigCPtr = cPtr;
}
protected static long getCPtr(CharVector obj) {
return (obj == null) ? 0 : obj.swigCPtr;
}
@SuppressWarnings("deprecation")
protected void finalize() {
delete();
}
public synchronized void delete() {
if (swigCPtr != 0) {
if (swigCMemOwn) {
swigCMemOwn = false;
swigfaissJNI.delete_CharVector(swigCPtr);
}
swigCPtr = 0;
}
}
public CharVector() {
this(swigfaissJNI.new_CharVector(), true);
}
public void push_back(char arg0) {
swigfaissJNI.CharVector_push_back(swigCPtr, this, arg0);
}
public void clear() {
swigfaissJNI.CharVector_clear(swigCPtr, this);
}
public String data() {
return swigfaissJNI.CharVector_data(swigCPtr, this);
}
public long size() {
return swigfaissJNI.CharVector_size(swigCPtr, this);
}
public char at(long n) {
return swigfaissJNI.CharVector_at(swigCPtr, this, n);
}
public void resize(long n) {
swigfaissJNI.CharVector_resize(swigCPtr, this, n);
}
public void reserve(long n) {
swigfaissJNI.CharVector_reserve(swigCPtr, this, n);
}
public void swap(CharVector other) {
swigfaissJNI.CharVector_swap(swigCPtr, this, CharVector.getCPtr(other), other);
}
}

View File

@ -1,101 +0,0 @@
/* ----------------------------------------------------------------------------
* This file was automatically generated by SWIG (http://www.swig.org).
* Version 4.0.2
*
* Do not make changes to this file unless you know what you are doing--modify
* the SWIG interface file instead.
* ----------------------------------------------------------------------------- */
package com.twitter.ann.faiss;
public class Clustering extends ClusteringParameters {
private transient long swigCPtr;
protected Clustering(long cPtr, boolean cMemoryOwn) {
super(swigfaissJNI.Clustering_SWIGUpcast(cPtr), cMemoryOwn);
swigCPtr = cPtr;
}
protected static long getCPtr(Clustering obj) {
return (obj == null) ? 0 : obj.swigCPtr;
}
@SuppressWarnings("deprecation")
protected void finalize() {
delete();
}
public synchronized void delete() {
if (swigCPtr != 0) {
if (swigCMemOwn) {
swigCMemOwn = false;
swigfaissJNI.delete_Clustering(swigCPtr);
}
swigCPtr = 0;
}
super.delete();
}
public void setD(long value) {
swigfaissJNI.Clustering_d_set(swigCPtr, this, value);
}
public long getD() {
return swigfaissJNI.Clustering_d_get(swigCPtr, this);
}
public void setK(long value) {
swigfaissJNI.Clustering_k_set(swigCPtr, this, value);
}
public long getK() {
return swigfaissJNI.Clustering_k_get(swigCPtr, this);
}
public void setCentroids(FloatVector value) {
swigfaissJNI.Clustering_centroids_set(swigCPtr, this, FloatVector.getCPtr(value), value);
}
public FloatVector getCentroids() {
long cPtr = swigfaissJNI.Clustering_centroids_get(swigCPtr, this);
return (cPtr == 0) ? null : new FloatVector(cPtr, false);
}
public void setIteration_stats(SWIGTYPE_p_std__vectorT_faiss__ClusteringIterationStats_t value) {
swigfaissJNI.Clustering_iteration_stats_set(swigCPtr, this, SWIGTYPE_p_std__vectorT_faiss__ClusteringIterationStats_t.getCPtr(value));
}
public SWIGTYPE_p_std__vectorT_faiss__ClusteringIterationStats_t getIteration_stats() {
long cPtr = swigfaissJNI.Clustering_iteration_stats_get(swigCPtr, this);
return (cPtr == 0) ? null : new SWIGTYPE_p_std__vectorT_faiss__ClusteringIterationStats_t(cPtr, false);
}
public Clustering(int d, int k) {
this(swigfaissJNI.new_Clustering__SWIG_0(d, k), true);
}
public Clustering(int d, int k, ClusteringParameters cp) {
this(swigfaissJNI.new_Clustering__SWIG_1(d, k, ClusteringParameters.getCPtr(cp), cp), true);
}
public void train(long n, SWIGTYPE_p_float x, Index index, SWIGTYPE_p_float x_weights) {
swigfaissJNI.Clustering_train__SWIG_0(swigCPtr, this, n, SWIGTYPE_p_float.getCPtr(x), Index.getCPtr(index), index, SWIGTYPE_p_float.getCPtr(x_weights));
}
public void train(long n, SWIGTYPE_p_float x, Index index) {
swigfaissJNI.Clustering_train__SWIG_1(swigCPtr, this, n, SWIGTYPE_p_float.getCPtr(x), Index.getCPtr(index), index);
}
public void train_encoded(long nx, SWIGTYPE_p_unsigned_char x_in, Index codec, Index index, SWIGTYPE_p_float weights) {
swigfaissJNI.Clustering_train_encoded__SWIG_0(swigCPtr, this, nx, SWIGTYPE_p_unsigned_char.getCPtr(x_in), Index.getCPtr(codec), codec, Index.getCPtr(index), index, SWIGTYPE_p_float.getCPtr(weights));
}
public void train_encoded(long nx, SWIGTYPE_p_unsigned_char x_in, Index codec, Index index) {
swigfaissJNI.Clustering_train_encoded__SWIG_1(swigCPtr, this, nx, SWIGTYPE_p_unsigned_char.getCPtr(x_in), Index.getCPtr(codec), codec, Index.getCPtr(index), index);
}
public void post_process_centroids() {
swigfaissJNI.Clustering_post_process_centroids(swigCPtr, this);
}
}

View File

@ -1,51 +0,0 @@
/* ----------------------------------------------------------------------------
* This file was automatically generated by SWIG (http://www.swig.org).
* Version 4.0.2
*
* Do not make changes to this file unless you know what you are doing--modify
* the SWIG interface file instead.
* ----------------------------------------------------------------------------- */
package com.twitter.ann.faiss;
public class Clustering1D extends Clustering {
private transient long swigCPtr;
protected Clustering1D(long cPtr, boolean cMemoryOwn) {
super(swigfaissJNI.Clustering1D_SWIGUpcast(cPtr), cMemoryOwn);
swigCPtr = cPtr;
}
protected static long getCPtr(Clustering1D obj) {
return (obj == null) ? 0 : obj.swigCPtr;
}
@SuppressWarnings("deprecation")
protected void finalize() {
delete();
}
public synchronized void delete() {
if (swigCPtr != 0) {
if (swigCMemOwn) {
swigCMemOwn = false;
swigfaissJNI.delete_Clustering1D(swigCPtr);
}
swigCPtr = 0;
}
super.delete();
}
public Clustering1D(int k) {
this(swigfaissJNI.new_Clustering1D__SWIG_0(k), true);
}
public Clustering1D(int k, ClusteringParameters cp) {
this(swigfaissJNI.new_Clustering1D__SWIG_1(k, ClusteringParameters.getCPtr(cp), cp), true);
}
public void train_exact(long n, SWIGTYPE_p_float x) {
swigfaissJNI.Clustering1D_train_exact(swigCPtr, this, n, SWIGTYPE_p_float.getCPtr(x));
}
}

View File

@ -1,83 +0,0 @@
/* ----------------------------------------------------------------------------
* This file was automatically generated by SWIG (http://www.swig.org).
* Version 4.0.2
*
* Do not make changes to this file unless you know what you are doing--modify
* the SWIG interface file instead.
* ----------------------------------------------------------------------------- */
package com.twitter.ann.faiss;
public class ClusteringIterationStats {
private transient long swigCPtr;
protected transient boolean swigCMemOwn;
protected ClusteringIterationStats(long cPtr, boolean cMemoryOwn) {
swigCMemOwn = cMemoryOwn;
swigCPtr = cPtr;
}
protected static long getCPtr(ClusteringIterationStats obj) {
return (obj == null) ? 0 : obj.swigCPtr;
}
@SuppressWarnings("deprecation")
protected void finalize() {
delete();
}
public synchronized void delete() {
if (swigCPtr != 0) {
if (swigCMemOwn) {
swigCMemOwn = false;
swigfaissJNI.delete_ClusteringIterationStats(swigCPtr);
}
swigCPtr = 0;
}
}
public void setObj(float value) {
swigfaissJNI.ClusteringIterationStats_obj_set(swigCPtr, this, value);
}
public float getObj() {
return swigfaissJNI.ClusteringIterationStats_obj_get(swigCPtr, this);
}
public void setTime(double value) {
swigfaissJNI.ClusteringIterationStats_time_set(swigCPtr, this, value);
}
public double getTime() {
return swigfaissJNI.ClusteringIterationStats_time_get(swigCPtr, this);
}
public void setTime_search(double value) {
swigfaissJNI.ClusteringIterationStats_time_search_set(swigCPtr, this, value);
}
public double getTime_search() {
return swigfaissJNI.ClusteringIterationStats_time_search_get(swigCPtr, this);
}
public void setImbalance_factor(double value) {
swigfaissJNI.ClusteringIterationStats_imbalance_factor_set(swigCPtr, this, value);
}
public double getImbalance_factor() {
return swigfaissJNI.ClusteringIterationStats_imbalance_factor_get(swigCPtr, this);
}
public void setNsplit(int value) {
swigfaissJNI.ClusteringIterationStats_nsplit_set(swigCPtr, this, value);
}
public int getNsplit() {
return swigfaissJNI.ClusteringIterationStats_nsplit_get(swigCPtr, this);
}
public ClusteringIterationStats() {
this(swigfaissJNI.new_ClusteringIterationStats(), true);
}
}

View File

@ -1,131 +0,0 @@
/* ----------------------------------------------------------------------------
* This file was automatically generated by SWIG (http://www.swig.org).
* Version 4.0.2
*
* Do not make changes to this file unless you know what you are doing--modify
* the SWIG interface file instead.
* ----------------------------------------------------------------------------- */
package com.twitter.ann.faiss;
public class ClusteringParameters {
private transient long swigCPtr;
protected transient boolean swigCMemOwn;
protected ClusteringParameters(long cPtr, boolean cMemoryOwn) {
swigCMemOwn = cMemoryOwn;
swigCPtr = cPtr;
}
protected static long getCPtr(ClusteringParameters obj) {
return (obj == null) ? 0 : obj.swigCPtr;
}
@SuppressWarnings("deprecation")
protected void finalize() {
delete();
}
public synchronized void delete() {
if (swigCPtr != 0) {
if (swigCMemOwn) {
swigCMemOwn = false;
swigfaissJNI.delete_ClusteringParameters(swigCPtr);
}
swigCPtr = 0;
}
}
public void setNiter(int value) {
swigfaissJNI.ClusteringParameters_niter_set(swigCPtr, this, value);
}
public int getNiter() {
return swigfaissJNI.ClusteringParameters_niter_get(swigCPtr, this);
}
public void setNredo(int value) {
swigfaissJNI.ClusteringParameters_nredo_set(swigCPtr, this, value);
}
public int getNredo() {
return swigfaissJNI.ClusteringParameters_nredo_get(swigCPtr, this);
}
public void setVerbose(boolean value) {
swigfaissJNI.ClusteringParameters_verbose_set(swigCPtr, this, value);
}
public boolean getVerbose() {
return swigfaissJNI.ClusteringParameters_verbose_get(swigCPtr, this);
}
public void setSpherical(boolean value) {
swigfaissJNI.ClusteringParameters_spherical_set(swigCPtr, this, value);
}
public boolean getSpherical() {
return swigfaissJNI.ClusteringParameters_spherical_get(swigCPtr, this);
}
public void setInt_centroids(boolean value) {
swigfaissJNI.ClusteringParameters_int_centroids_set(swigCPtr, this, value);
}
public boolean getInt_centroids() {
return swigfaissJNI.ClusteringParameters_int_centroids_get(swigCPtr, this);
}
public void setUpdate_index(boolean value) {
swigfaissJNI.ClusteringParameters_update_index_set(swigCPtr, this, value);
}
public boolean getUpdate_index() {
return swigfaissJNI.ClusteringParameters_update_index_get(swigCPtr, this);
}
public void setFrozen_centroids(boolean value) {
swigfaissJNI.ClusteringParameters_frozen_centroids_set(swigCPtr, this, value);
}
public boolean getFrozen_centroids() {
return swigfaissJNI.ClusteringParameters_frozen_centroids_get(swigCPtr, this);
}
public void setMin_points_per_centroid(int value) {
swigfaissJNI.ClusteringParameters_min_points_per_centroid_set(swigCPtr, this, value);
}
public int getMin_points_per_centroid() {
return swigfaissJNI.ClusteringParameters_min_points_per_centroid_get(swigCPtr, this);
}
public void setMax_points_per_centroid(int value) {
swigfaissJNI.ClusteringParameters_max_points_per_centroid_set(swigCPtr, this, value);
}
public int getMax_points_per_centroid() {
return swigfaissJNI.ClusteringParameters_max_points_per_centroid_get(swigCPtr, this);
}
public void setSeed(int value) {
swigfaissJNI.ClusteringParameters_seed_set(swigCPtr, this, value);
}
public int getSeed() {
return swigfaissJNI.ClusteringParameters_seed_get(swigCPtr, this);
}
public void setDecode_block_size(long value) {
swigfaissJNI.ClusteringParameters_decode_block_size_set(swigCPtr, this, value);
}
public long getDecode_block_size() {
return swigfaissJNI.ClusteringParameters_decode_block_size_get(swigCPtr, this);
}
public ClusteringParameters() {
this(swigfaissJNI.new_ClusteringParameters(), true);
}
}

View File

@ -1,47 +0,0 @@
/* ----------------------------------------------------------------------------
* This file was automatically generated by SWIG (http://www.swig.org).
* Version 4.0.2
*
* Do not make changes to this file unless you know what you are doing--modify
* the SWIG interface file instead.
* ----------------------------------------------------------------------------- */
package com.twitter.ann.faiss;
public class DistanceComputer {
private transient long swigCPtr;
protected transient boolean swigCMemOwn;
protected DistanceComputer(long cPtr, boolean cMemoryOwn) {
swigCMemOwn = cMemoryOwn;
swigCPtr = cPtr;
}
protected static long getCPtr(DistanceComputer obj) {
return (obj == null) ? 0 : obj.swigCPtr;
}
@SuppressWarnings("deprecation")
protected void finalize() {
delete();
}
public synchronized void delete() {
if (swigCPtr != 0) {
if (swigCMemOwn) {
swigCMemOwn = false;
swigfaissJNI.delete_DistanceComputer(swigCPtr);
}
swigCPtr = 0;
}
}
public void set_query(SWIGTYPE_p_float x) {
swigfaissJNI.DistanceComputer_set_query(swigCPtr, this, SWIGTYPE_p_float.getCPtr(x));
}
public float symmetric_dis(long i, long j) {
return swigfaissJNI.DistanceComputer_symmetric_dis(swigCPtr, this, i, j);
}
}

View File

@ -1,76 +0,0 @@
/* ----------------------------------------------------------------------------
* This file was automatically generated by SWIG (http://www.swig.org).
* Version 4.0.2
*
* Do not make changes to this file unless you know what you are doing--modify
* the SWIG interface file instead.
* ----------------------------------------------------------------------------- */
package com.twitter.ann.faiss;
public class DoubleVector {
private transient long swigCPtr;
protected transient boolean swigCMemOwn;
protected DoubleVector(long cPtr, boolean cMemoryOwn) {
swigCMemOwn = cMemoryOwn;
swigCPtr = cPtr;
}
protected static long getCPtr(DoubleVector obj) {
return (obj == null) ? 0 : obj.swigCPtr;
}
@SuppressWarnings("deprecation")
protected void finalize() {
delete();
}
public synchronized void delete() {
if (swigCPtr != 0) {
if (swigCMemOwn) {
swigCMemOwn = false;
swigfaissJNI.delete_DoubleVector(swigCPtr);
}
swigCPtr = 0;
}
}
public DoubleVector() {
this(swigfaissJNI.new_DoubleVector(), true);
}
public void push_back(double arg0) {
swigfaissJNI.DoubleVector_push_back(swigCPtr, this, arg0);
}
public void clear() {
swigfaissJNI.DoubleVector_clear(swigCPtr, this);
}
public SWIGTYPE_p_double data() {
long cPtr = swigfaissJNI.DoubleVector_data(swigCPtr, this);
return (cPtr == 0) ? null : new SWIGTYPE_p_double(cPtr, false);
}
public long size() {
return swigfaissJNI.DoubleVector_size(swigCPtr, this);
}
public double at(long n) {
return swigfaissJNI.DoubleVector_at(swigCPtr, this, n);
}
public void resize(long n) {
swigfaissJNI.DoubleVector_resize(swigCPtr, this, n);
}
public void reserve(long n) {
swigfaissJNI.DoubleVector_reserve(swigCPtr, this, n);
}
public void swap(DoubleVector other) {
swigfaissJNI.DoubleVector_swap(swigCPtr, this, DoubleVector.getCPtr(other), other);
}
}

View File

@ -1,76 +0,0 @@
/* ----------------------------------------------------------------------------
* This file was automatically generated by SWIG (http://www.swig.org).
* Version 4.0.2
*
* Do not make changes to this file unless you know what you are doing--modify
* the SWIG interface file instead.
* ----------------------------------------------------------------------------- */
package com.twitter.ann.faiss;
public class FloatVector {
private transient long swigCPtr;
protected transient boolean swigCMemOwn;
protected FloatVector(long cPtr, boolean cMemoryOwn) {
swigCMemOwn = cMemoryOwn;
swigCPtr = cPtr;
}
protected static long getCPtr(FloatVector obj) {
return (obj == null) ? 0 : obj.swigCPtr;
}
@SuppressWarnings("deprecation")
protected void finalize() {
delete();
}
public synchronized void delete() {
if (swigCPtr != 0) {
if (swigCMemOwn) {
swigCMemOwn = false;
swigfaissJNI.delete_FloatVector(swigCPtr);
}
swigCPtr = 0;
}
}
public FloatVector() {
this(swigfaissJNI.new_FloatVector(), true);
}
public void push_back(float arg0) {
swigfaissJNI.FloatVector_push_back(swigCPtr, this, arg0);
}
public void clear() {
swigfaissJNI.FloatVector_clear(swigCPtr, this);
}
public SWIGTYPE_p_float data() {
long cPtr = swigfaissJNI.FloatVector_data(swigCPtr, this);
return (cPtr == 0) ? null : new SWIGTYPE_p_float(cPtr, false);
}
public long size() {
return swigfaissJNI.FloatVector_size(swigCPtr, this);
}
public float at(long n) {
return swigfaissJNI.FloatVector_at(swigCPtr, this, n);
}
public void resize(long n) {
swigfaissJNI.FloatVector_resize(swigCPtr, this, n);
}
public void reserve(long n) {
swigfaissJNI.FloatVector_reserve(swigCPtr, this, n);
}
public void swap(FloatVector other) {
swigfaissJNI.FloatVector_swap(swigCPtr, this, FloatVector.getCPtr(other), other);
}
}

View File

@ -1,76 +0,0 @@
/* ----------------------------------------------------------------------------
* This file was automatically generated by SWIG (http://www.swig.org).
* Version 4.0.2
*
* Do not make changes to this file unless you know what you are doing--modify
* the SWIG interface file instead.
* ----------------------------------------------------------------------------- */
package com.twitter.ann.faiss;
public class FloatVectorVector {
private transient long swigCPtr;
protected transient boolean swigCMemOwn;
protected FloatVectorVector(long cPtr, boolean cMemoryOwn) {
swigCMemOwn = cMemoryOwn;
swigCPtr = cPtr;
}
protected static long getCPtr(FloatVectorVector obj) {
return (obj == null) ? 0 : obj.swigCPtr;
}
@SuppressWarnings("deprecation")
protected void finalize() {
delete();
}
public synchronized void delete() {
if (swigCPtr != 0) {
if (swigCMemOwn) {
swigCMemOwn = false;
swigfaissJNI.delete_FloatVectorVector(swigCPtr);
}
swigCPtr = 0;
}
}
public FloatVectorVector() {
this(swigfaissJNI.new_FloatVectorVector(), true);
}
public void push_back(FloatVector arg0) {
swigfaissJNI.FloatVectorVector_push_back(swigCPtr, this, FloatVector.getCPtr(arg0), arg0);
}
public void clear() {
swigfaissJNI.FloatVectorVector_clear(swigCPtr, this);
}
public FloatVector data() {
long cPtr = swigfaissJNI.FloatVectorVector_data(swigCPtr, this);
return (cPtr == 0) ? null : new FloatVector(cPtr, false);
}
public long size() {
return swigfaissJNI.FloatVectorVector_size(swigCPtr, this);
}
public FloatVector at(long n) {
return new FloatVector(swigfaissJNI.FloatVectorVector_at(swigCPtr, this, n), true);
}
public void resize(long n) {
swigfaissJNI.FloatVectorVector_resize(swigCPtr, this, n);
}
public void reserve(long n) {
swigfaissJNI.FloatVectorVector_reserve(swigCPtr, this, n);
}
public void swap(FloatVectorVector other) {
swigfaissJNI.FloatVectorVector_swap(swigCPtr, this, FloatVectorVector.getCPtr(other), other);
}
}

View File

@ -1,63 +0,0 @@
/* ----------------------------------------------------------------------------
* This file was automatically generated by SWIG (http://www.swig.org).
* Version 4.0.2
*
* Do not make changes to this file unless you know what you are doing--modify
* the SWIG interface file instead.
* ----------------------------------------------------------------------------- */
package com.twitter.ann.faiss;
public class GenHammingComputer16 {
private transient long swigCPtr;
protected transient boolean swigCMemOwn;
protected GenHammingComputer16(long cPtr, boolean cMemoryOwn) {
swigCMemOwn = cMemoryOwn;
swigCPtr = cPtr;
}
protected static long getCPtr(GenHammingComputer16 obj) {
return (obj == null) ? 0 : obj.swigCPtr;
}
@SuppressWarnings("deprecation")
protected void finalize() {
delete();
}
public synchronized void delete() {
if (swigCPtr != 0) {
if (swigCMemOwn) {
swigCMemOwn = false;
swigfaissJNI.delete_GenHammingComputer16(swigCPtr);
}
swigCPtr = 0;
}
}
public void setA0(long value) {
swigfaissJNI.GenHammingComputer16_a0_set(swigCPtr, this, value);
}
public long getA0() {
return swigfaissJNI.GenHammingComputer16_a0_get(swigCPtr, this);
}
public void setA1(long value) {
swigfaissJNI.GenHammingComputer16_a1_set(swigCPtr, this, value);
}
public long getA1() {
return swigfaissJNI.GenHammingComputer16_a1_get(swigCPtr, this);
}
public GenHammingComputer16(SWIGTYPE_p_unsigned_char a8, int code_size) {
this(swigfaissJNI.new_GenHammingComputer16(SWIGTYPE_p_unsigned_char.getCPtr(a8), code_size), true);
}
public int hamming(SWIGTYPE_p_unsigned_char b8) {
return swigfaissJNI.GenHammingComputer16_hamming(swigCPtr, this, SWIGTYPE_p_unsigned_char.getCPtr(b8));
}
}

View File

@ -1,79 +0,0 @@
/* ----------------------------------------------------------------------------
* This file was automatically generated by SWIG (http://www.swig.org).
* Version 4.0.2
*
* Do not make changes to this file unless you know what you are doing--modify
* the SWIG interface file instead.
* ----------------------------------------------------------------------------- */
package com.twitter.ann.faiss;
public class GenHammingComputer32 {
private transient long swigCPtr;
protected transient boolean swigCMemOwn;
protected GenHammingComputer32(long cPtr, boolean cMemoryOwn) {
swigCMemOwn = cMemoryOwn;
swigCPtr = cPtr;
}
protected static long getCPtr(GenHammingComputer32 obj) {
return (obj == null) ? 0 : obj.swigCPtr;
}
@SuppressWarnings("deprecation")
protected void finalize() {
delete();
}
public synchronized void delete() {
if (swigCPtr != 0) {
if (swigCMemOwn) {
swigCMemOwn = false;
swigfaissJNI.delete_GenHammingComputer32(swigCPtr);
}
swigCPtr = 0;
}
}
public void setA0(long value) {
swigfaissJNI.GenHammingComputer32_a0_set(swigCPtr, this, value);
}
public long getA0() {
return swigfaissJNI.GenHammingComputer32_a0_get(swigCPtr, this);
}
public void setA1(long value) {
swigfaissJNI.GenHammingComputer32_a1_set(swigCPtr, this, value);
}
public long getA1() {
return swigfaissJNI.GenHammingComputer32_a1_get(swigCPtr, this);
}
public void setA2(long value) {
swigfaissJNI.GenHammingComputer32_a2_set(swigCPtr, this, value);
}
public long getA2() {
return swigfaissJNI.GenHammingComputer32_a2_get(swigCPtr, this);
}
public void setA3(long value) {
swigfaissJNI.GenHammingComputer32_a3_set(swigCPtr, this, value);
}
public long getA3() {
return swigfaissJNI.GenHammingComputer32_a3_get(swigCPtr, this);
}
public GenHammingComputer32(SWIGTYPE_p_unsigned_char a8, int code_size) {
this(swigfaissJNI.new_GenHammingComputer32(SWIGTYPE_p_unsigned_char.getCPtr(a8), code_size), true);
}
public int hamming(SWIGTYPE_p_unsigned_char b8) {
return swigfaissJNI.GenHammingComputer32_hamming(swigCPtr, this, SWIGTYPE_p_unsigned_char.getCPtr(b8));
}
}

View File

@ -1,55 +0,0 @@
/* ----------------------------------------------------------------------------
* This file was automatically generated by SWIG (http://www.swig.org).
* Version 4.0.2
*
* Do not make changes to this file unless you know what you are doing--modify
* the SWIG interface file instead.
* ----------------------------------------------------------------------------- */
package com.twitter.ann.faiss;
public class GenHammingComputer8 {
private transient long swigCPtr;
protected transient boolean swigCMemOwn;
protected GenHammingComputer8(long cPtr, boolean cMemoryOwn) {
swigCMemOwn = cMemoryOwn;
swigCPtr = cPtr;
}
protected static long getCPtr(GenHammingComputer8 obj) {
return (obj == null) ? 0 : obj.swigCPtr;
}
@SuppressWarnings("deprecation")
protected void finalize() {
delete();
}
public synchronized void delete() {
if (swigCPtr != 0) {
if (swigCMemOwn) {
swigCMemOwn = false;
swigfaissJNI.delete_GenHammingComputer8(swigCPtr);
}
swigCPtr = 0;
}
}
public void setA0(long value) {
swigfaissJNI.GenHammingComputer8_a0_set(swigCPtr, this, value);
}
public long getA0() {
return swigfaissJNI.GenHammingComputer8_a0_get(swigCPtr, this);
}
public GenHammingComputer8(SWIGTYPE_p_unsigned_char a, int code_size) {
this(swigfaissJNI.new_GenHammingComputer8(SWIGTYPE_p_unsigned_char.getCPtr(a), code_size), true);
}
public int hamming(SWIGTYPE_p_unsigned_char b) {
return swigfaissJNI.GenHammingComputer8_hamming(swigCPtr, this, SWIGTYPE_p_unsigned_char.getCPtr(b));
}
}

View File

@ -1,64 +0,0 @@
/* ----------------------------------------------------------------------------
* This file was automatically generated by SWIG (http://www.swig.org).
* Version 4.0.2
*
* Do not make changes to this file unless you know what you are doing--modify
* the SWIG interface file instead.
* ----------------------------------------------------------------------------- */
package com.twitter.ann.faiss;
public class GenHammingComputerM8 {
private transient long swigCPtr;
protected transient boolean swigCMemOwn;
protected GenHammingComputerM8(long cPtr, boolean cMemoryOwn) {
swigCMemOwn = cMemoryOwn;
swigCPtr = cPtr;
}
protected static long getCPtr(GenHammingComputerM8 obj) {
return (obj == null) ? 0 : obj.swigCPtr;
}
@SuppressWarnings("deprecation")
protected void finalize() {
delete();
}
public synchronized void delete() {
if (swigCPtr != 0) {
if (swigCMemOwn) {
swigCMemOwn = false;
swigfaissJNI.delete_GenHammingComputerM8(swigCPtr);
}
swigCPtr = 0;
}
}
public void setA(SWIGTYPE_p_unsigned_long value) {
swigfaissJNI.GenHammingComputerM8_a_set(swigCPtr, this, SWIGTYPE_p_unsigned_long.getCPtr(value));
}
public SWIGTYPE_p_unsigned_long getA() {
long cPtr = swigfaissJNI.GenHammingComputerM8_a_get(swigCPtr, this);
return (cPtr == 0) ? null : new SWIGTYPE_p_unsigned_long(cPtr, false);
}
public void setN(int value) {
swigfaissJNI.GenHammingComputerM8_n_set(swigCPtr, this, value);
}
public int getN() {
return swigfaissJNI.GenHammingComputerM8_n_get(swigCPtr, this);
}
public GenHammingComputerM8(SWIGTYPE_p_unsigned_char a8, int code_size) {
this(swigfaissJNI.new_GenHammingComputerM8(SWIGTYPE_p_unsigned_char.getCPtr(a8), code_size), true);
}
public int hamming(SWIGTYPE_p_unsigned_char b8) {
return swigfaissJNI.GenHammingComputerM8_hamming(swigCPtr, this, SWIGTYPE_p_unsigned_char.getCPtr(b8));
}
}

View File

@ -1,437 +0,0 @@
/* ----------------------------------------------------------------------------
* This file was automatically generated by SWIG (http://www.swig.org).
* Version 4.0.2
*
* Do not make changes to this file unless you know what you are doing--modify
* the SWIG interface file instead.
* ----------------------------------------------------------------------------- */
package com.twitter.ann.faiss;
public class HNSW {
private transient long swigCPtr;
protected transient boolean swigCMemOwn;
protected HNSW(long cPtr, boolean cMemoryOwn) {
swigCMemOwn = cMemoryOwn;
swigCPtr = cPtr;
}
protected static long getCPtr(HNSW obj) {
return (obj == null) ? 0 : obj.swigCPtr;
}
@SuppressWarnings("deprecation")
protected void finalize() {
delete();
}
public synchronized void delete() {
if (swigCPtr != 0) {
if (swigCMemOwn) {
swigCMemOwn = false;
swigfaissJNI.delete_HNSW(swigCPtr);
}
swigCPtr = 0;
}
}
static public class MinimaxHeap {
private transient long swigCPtr;
protected transient boolean swigCMemOwn;
protected MinimaxHeap(long cPtr, boolean cMemoryOwn) {
swigCMemOwn = cMemoryOwn;
swigCPtr = cPtr;
}
protected static long getCPtr(MinimaxHeap obj) {
return (obj == null) ? 0 : obj.swigCPtr;
}
@SuppressWarnings("deprecation")
protected void finalize() {
delete();
}
public synchronized void delete() {
if (swigCPtr != 0) {
if (swigCMemOwn) {
swigCMemOwn = false;
swigfaissJNI.delete_HNSW_MinimaxHeap(swigCPtr);
}
swigCPtr = 0;
}
}
public void setN(int value) {
swigfaissJNI.HNSW_MinimaxHeap_n_set(swigCPtr, this, value);
}
public int getN() {
return swigfaissJNI.HNSW_MinimaxHeap_n_get(swigCPtr, this);
}
public void setK(int value) {
swigfaissJNI.HNSW_MinimaxHeap_k_set(swigCPtr, this, value);
}
public int getK() {
return swigfaissJNI.HNSW_MinimaxHeap_k_get(swigCPtr, this);
}
public void setNvalid(int value) {
swigfaissJNI.HNSW_MinimaxHeap_nvalid_set(swigCPtr, this, value);
}
public int getNvalid() {
return swigfaissJNI.HNSW_MinimaxHeap_nvalid_get(swigCPtr, this);
}
public void setIds(IntVector value) {
swigfaissJNI.HNSW_MinimaxHeap_ids_set(swigCPtr, this, IntVector.getCPtr(value), value);
}
public IntVector getIds() {
long cPtr = swigfaissJNI.HNSW_MinimaxHeap_ids_get(swigCPtr, this);
return (cPtr == 0) ? null : new IntVector(cPtr, false);
}
public void setDis(FloatVector value) {
swigfaissJNI.HNSW_MinimaxHeap_dis_set(swigCPtr, this, FloatVector.getCPtr(value), value);
}
public FloatVector getDis() {
long cPtr = swigfaissJNI.HNSW_MinimaxHeap_dis_get(swigCPtr, this);
return (cPtr == 0) ? null : new FloatVector(cPtr, false);
}
public MinimaxHeap(int n) {
this(swigfaissJNI.new_HNSW_MinimaxHeap(n), true);
}
public void push(int i, float v) {
swigfaissJNI.HNSW_MinimaxHeap_push(swigCPtr, this, i, v);
}
public float max() {
return swigfaissJNI.HNSW_MinimaxHeap_max(swigCPtr, this);
}
public int size() {
return swigfaissJNI.HNSW_MinimaxHeap_size(swigCPtr, this);
}
public void clear() {
swigfaissJNI.HNSW_MinimaxHeap_clear(swigCPtr, this);
}
public int pop_min(SWIGTYPE_p_float vmin_out) {
return swigfaissJNI.HNSW_MinimaxHeap_pop_min__SWIG_0(swigCPtr, this, SWIGTYPE_p_float.getCPtr(vmin_out));
}
public int pop_min() {
return swigfaissJNI.HNSW_MinimaxHeap_pop_min__SWIG_1(swigCPtr, this);
}
public int count_below(float thresh) {
return swigfaissJNI.HNSW_MinimaxHeap_count_below(swigCPtr, this, thresh);
}
}
static public class NodeDistCloser {
private transient long swigCPtr;
protected transient boolean swigCMemOwn;
protected NodeDistCloser(long cPtr, boolean cMemoryOwn) {
swigCMemOwn = cMemoryOwn;
swigCPtr = cPtr;
}
protected static long getCPtr(NodeDistCloser obj) {
return (obj == null) ? 0 : obj.swigCPtr;
}
@SuppressWarnings("deprecation")
protected void finalize() {
delete();
}
public synchronized void delete() {
if (swigCPtr != 0) {
if (swigCMemOwn) {
swigCMemOwn = false;
swigfaissJNI.delete_HNSW_NodeDistCloser(swigCPtr);
}
swigCPtr = 0;
}
}
public void setD(float value) {
swigfaissJNI.HNSW_NodeDistCloser_d_set(swigCPtr, this, value);
}
public float getD() {
return swigfaissJNI.HNSW_NodeDistCloser_d_get(swigCPtr, this);
}
public void setId(int value) {
swigfaissJNI.HNSW_NodeDistCloser_id_set(swigCPtr, this, value);
}
public int getId() {
return swigfaissJNI.HNSW_NodeDistCloser_id_get(swigCPtr, this);
}
public NodeDistCloser(float d, int id) {
this(swigfaissJNI.new_HNSW_NodeDistCloser(d, id), true);
}
}
static public class NodeDistFarther {
private transient long swigCPtr;
protected transient boolean swigCMemOwn;
protected NodeDistFarther(long cPtr, boolean cMemoryOwn) {
swigCMemOwn = cMemoryOwn;
swigCPtr = cPtr;
}
protected static long getCPtr(NodeDistFarther obj) {
return (obj == null) ? 0 : obj.swigCPtr;
}
@SuppressWarnings("deprecation")
protected void finalize() {
delete();
}
public synchronized void delete() {
if (swigCPtr != 0) {
if (swigCMemOwn) {
swigCMemOwn = false;
swigfaissJNI.delete_HNSW_NodeDistFarther(swigCPtr);
}
swigCPtr = 0;
}
}
public void setD(float value) {
swigfaissJNI.HNSW_NodeDistFarther_d_set(swigCPtr, this, value);
}
public float getD() {
return swigfaissJNI.HNSW_NodeDistFarther_d_get(swigCPtr, this);
}
public void setId(int value) {
swigfaissJNI.HNSW_NodeDistFarther_id_set(swigCPtr, this, value);
}
public int getId() {
return swigfaissJNI.HNSW_NodeDistFarther_id_get(swigCPtr, this);
}
public NodeDistFarther(float d, int id) {
this(swigfaissJNI.new_HNSW_NodeDistFarther(d, id), true);
}
}
public void setAssign_probas(DoubleVector value) {
swigfaissJNI.HNSW_assign_probas_set(swigCPtr, this, DoubleVector.getCPtr(value), value);
}
public DoubleVector getAssign_probas() {
long cPtr = swigfaissJNI.HNSW_assign_probas_get(swigCPtr, this);
return (cPtr == 0) ? null : new DoubleVector(cPtr, false);
}
public void setCum_nneighbor_per_level(IntVector value) {
swigfaissJNI.HNSW_cum_nneighbor_per_level_set(swigCPtr, this, IntVector.getCPtr(value), value);
}
public IntVector getCum_nneighbor_per_level() {
long cPtr = swigfaissJNI.HNSW_cum_nneighbor_per_level_get(swigCPtr, this);
return (cPtr == 0) ? null : new IntVector(cPtr, false);
}
public void setLevels(IntVector value) {
swigfaissJNI.HNSW_levels_set(swigCPtr, this, IntVector.getCPtr(value), value);
}
public IntVector getLevels() {
long cPtr = swigfaissJNI.HNSW_levels_get(swigCPtr, this);
return (cPtr == 0) ? null : new IntVector(cPtr, false);
}
public void setOffsets(Uint64Vector value) {
swigfaissJNI.HNSW_offsets_set(swigCPtr, this, Uint64Vector.getCPtr(value), value);
}
public Uint64Vector getOffsets() {
long cPtr = swigfaissJNI.HNSW_offsets_get(swigCPtr, this);
return (cPtr == 0) ? null : new Uint64Vector(cPtr, false);
}
public void setNeighbors(IntVector value) {
swigfaissJNI.HNSW_neighbors_set(swigCPtr, this, IntVector.getCPtr(value), value);
}
public IntVector getNeighbors() {
long cPtr = swigfaissJNI.HNSW_neighbors_get(swigCPtr, this);
return (cPtr == 0) ? null : new IntVector(cPtr, false);
}
public void setEntry_point(int value) {
swigfaissJNI.HNSW_entry_point_set(swigCPtr, this, value);
}
public int getEntry_point() {
return swigfaissJNI.HNSW_entry_point_get(swigCPtr, this);
}
public void setRng(SWIGTYPE_p_faiss__RandomGenerator value) {
swigfaissJNI.HNSW_rng_set(swigCPtr, this, SWIGTYPE_p_faiss__RandomGenerator.getCPtr(value));
}
public SWIGTYPE_p_faiss__RandomGenerator getRng() {
long cPtr = swigfaissJNI.HNSW_rng_get(swigCPtr, this);
return (cPtr == 0) ? null : new SWIGTYPE_p_faiss__RandomGenerator(cPtr, false);
}
public void setMax_level(int value) {
swigfaissJNI.HNSW_max_level_set(swigCPtr, this, value);
}
public int getMax_level() {
return swigfaissJNI.HNSW_max_level_get(swigCPtr, this);
}
public void setEfConstruction(int value) {
swigfaissJNI.HNSW_efConstruction_set(swigCPtr, this, value);
}
public int getEfConstruction() {
return swigfaissJNI.HNSW_efConstruction_get(swigCPtr, this);
}
public void setEfSearch(int value) {
swigfaissJNI.HNSW_efSearch_set(swigCPtr, this, value);
}
public int getEfSearch() {
return swigfaissJNI.HNSW_efSearch_get(swigCPtr, this);
}
public void setCheck_relative_distance(boolean value) {
swigfaissJNI.HNSW_check_relative_distance_set(swigCPtr, this, value);
}
public boolean getCheck_relative_distance() {
return swigfaissJNI.HNSW_check_relative_distance_get(swigCPtr, this);
}
public void setUpper_beam(int value) {
swigfaissJNI.HNSW_upper_beam_set(swigCPtr, this, value);
}
public int getUpper_beam() {
return swigfaissJNI.HNSW_upper_beam_get(swigCPtr, this);
}
public void setSearch_bounded_queue(boolean value) {
swigfaissJNI.HNSW_search_bounded_queue_set(swigCPtr, this, value);
}
public boolean getSearch_bounded_queue() {
return swigfaissJNI.HNSW_search_bounded_queue_get(swigCPtr, this);
}
public void set_default_probas(int M, float levelMult) {
swigfaissJNI.HNSW_set_default_probas(swigCPtr, this, M, levelMult);
}
public void set_nb_neighbors(int level_no, int n) {
swigfaissJNI.HNSW_set_nb_neighbors(swigCPtr, this, level_no, n);
}
public int nb_neighbors(int layer_no) {
return swigfaissJNI.HNSW_nb_neighbors(swigCPtr, this, layer_no);
}
public int cum_nb_neighbors(int layer_no) {
return swigfaissJNI.HNSW_cum_nb_neighbors(swigCPtr, this, layer_no);
}
public void neighbor_range(long no, int layer_no, SWIGTYPE_p_unsigned_long begin, SWIGTYPE_p_unsigned_long end) {
swigfaissJNI.HNSW_neighbor_range(swigCPtr, this, no, layer_no, SWIGTYPE_p_unsigned_long.getCPtr(begin), SWIGTYPE_p_unsigned_long.getCPtr(end));
}
public HNSW(int M) {
this(swigfaissJNI.new_HNSW__SWIG_0(M), true);
}
public HNSW() {
this(swigfaissJNI.new_HNSW__SWIG_1(), true);
}
public int random_level() {
return swigfaissJNI.HNSW_random_level(swigCPtr, this);
}
public void fill_with_random_links(long n) {
swigfaissJNI.HNSW_fill_with_random_links(swigCPtr, this, n);
}
public void add_links_starting_from(DistanceComputer ptdis, int pt_id, int nearest, float d_nearest, int level, SWIGTYPE_p_omp_lock_t locks, VisitedTable vt) {
swigfaissJNI.HNSW_add_links_starting_from(swigCPtr, this, DistanceComputer.getCPtr(ptdis), ptdis, pt_id, nearest, d_nearest, level, SWIGTYPE_p_omp_lock_t.getCPtr(locks), VisitedTable.getCPtr(vt), vt);
}
public void add_with_locks(DistanceComputer ptdis, int pt_level, int pt_id, SWIGTYPE_p_std__vectorT_omp_lock_t_t locks, VisitedTable vt) {
swigfaissJNI.HNSW_add_with_locks(swigCPtr, this, DistanceComputer.getCPtr(ptdis), ptdis, pt_level, pt_id, SWIGTYPE_p_std__vectorT_omp_lock_t_t.getCPtr(locks), VisitedTable.getCPtr(vt), vt);
}
public int search_from_candidates(DistanceComputer qdis, int k, LongVector I, SWIGTYPE_p_float D, HNSW.MinimaxHeap candidates, VisitedTable vt, HNSWStats stats, int level, int nres_in) {
return swigfaissJNI.HNSW_search_from_candidates__SWIG_0(swigCPtr, this, DistanceComputer.getCPtr(qdis), qdis, k, SWIGTYPE_p_long_long.getCPtr(I.data()), I, SWIGTYPE_p_float.getCPtr(D), HNSW.MinimaxHeap.getCPtr(candidates), candidates, VisitedTable.getCPtr(vt), vt, HNSWStats.getCPtr(stats), stats, level, nres_in);
}
public int search_from_candidates(DistanceComputer qdis, int k, LongVector I, SWIGTYPE_p_float D, HNSW.MinimaxHeap candidates, VisitedTable vt, HNSWStats stats, int level) {
return swigfaissJNI.HNSW_search_from_candidates__SWIG_1(swigCPtr, this, DistanceComputer.getCPtr(qdis), qdis, k, SWIGTYPE_p_long_long.getCPtr(I.data()), I, SWIGTYPE_p_float.getCPtr(D), HNSW.MinimaxHeap.getCPtr(candidates), candidates, VisitedTable.getCPtr(vt), vt, HNSWStats.getCPtr(stats), stats, level);
}
public SWIGTYPE_p_std__priority_queueT_std__pairT_float_int_t_t search_from_candidate_unbounded(SWIGTYPE_p_std__pairT_float_int_t node, DistanceComputer qdis, int ef, VisitedTable vt, HNSWStats stats) {
return new SWIGTYPE_p_std__priority_queueT_std__pairT_float_int_t_t(swigfaissJNI.HNSW_search_from_candidate_unbounded(swigCPtr, this, SWIGTYPE_p_std__pairT_float_int_t.getCPtr(node), DistanceComputer.getCPtr(qdis), qdis, ef, VisitedTable.getCPtr(vt), vt, HNSWStats.getCPtr(stats), stats), true);
}
public HNSWStats search(DistanceComputer qdis, int k, LongVector I, SWIGTYPE_p_float D, VisitedTable vt) {
return new HNSWStats(swigfaissJNI.HNSW_search(swigCPtr, this, DistanceComputer.getCPtr(qdis), qdis, k, SWIGTYPE_p_long_long.getCPtr(I.data()), I, SWIGTYPE_p_float.getCPtr(D), VisitedTable.getCPtr(vt), vt), true);
}
public void reset() {
swigfaissJNI.HNSW_reset(swigCPtr, this);
}
public void clear_neighbor_tables(int level) {
swigfaissJNI.HNSW_clear_neighbor_tables(swigCPtr, this, level);
}
public void print_neighbor_stats(int level) {
swigfaissJNI.HNSW_print_neighbor_stats(swigCPtr, this, level);
}
public int prepare_level_tab(long n, boolean preset_levels) {
return swigfaissJNI.HNSW_prepare_level_tab__SWIG_0(swigCPtr, this, n, preset_levels);
}
public int prepare_level_tab(long n) {
return swigfaissJNI.HNSW_prepare_level_tab__SWIG_1(swigCPtr, this, n);
}
public static void shrink_neighbor_list(DistanceComputer qdis, SWIGTYPE_p_std__priority_queueT_faiss__HNSW__NodeDistFarther_t input, SWIGTYPE_p_std__vectorT_faiss__HNSW__NodeDistFarther_t output, int max_size) {
swigfaissJNI.HNSW_shrink_neighbor_list(DistanceComputer.getCPtr(qdis), qdis, SWIGTYPE_p_std__priority_queueT_faiss__HNSW__NodeDistFarther_t.getCPtr(input), SWIGTYPE_p_std__vectorT_faiss__HNSW__NodeDistFarther_t.getCPtr(output), max_size);
}
}

View File

@ -1,111 +0,0 @@
/* ----------------------------------------------------------------------------
* This file was automatically generated by SWIG (http://www.swig.org).
* Version 4.0.2
*
* Do not make changes to this file unless you know what you are doing--modify
* the SWIG interface file instead.
* ----------------------------------------------------------------------------- */
package com.twitter.ann.faiss;
public class HNSWStats {
private transient long swigCPtr;
protected transient boolean swigCMemOwn;
protected HNSWStats(long cPtr, boolean cMemoryOwn) {
swigCMemOwn = cMemoryOwn;
swigCPtr = cPtr;
}
protected static long getCPtr(HNSWStats obj) {
return (obj == null) ? 0 : obj.swigCPtr;
}
@SuppressWarnings("deprecation")
protected void finalize() {
delete();
}
public synchronized void delete() {
if (swigCPtr != 0) {
if (swigCMemOwn) {
swigCMemOwn = false;
swigfaissJNI.delete_HNSWStats(swigCPtr);
}
swigCPtr = 0;
}
}
public void setN1(long value) {
swigfaissJNI.HNSWStats_n1_set(swigCPtr, this, value);
}
public long getN1() {
return swigfaissJNI.HNSWStats_n1_get(swigCPtr, this);
}
public void setN2(long value) {
swigfaissJNI.HNSWStats_n2_set(swigCPtr, this, value);
}
public long getN2() {
return swigfaissJNI.HNSWStats_n2_get(swigCPtr, this);
}
public void setN3(long value) {
swigfaissJNI.HNSWStats_n3_set(swigCPtr, this, value);
}
public long getN3() {
return swigfaissJNI.HNSWStats_n3_get(swigCPtr, this);
}
public void setNdis(long value) {
swigfaissJNI.HNSWStats_ndis_set(swigCPtr, this, value);
}
public long getNdis() {
return swigfaissJNI.HNSWStats_ndis_get(swigCPtr, this);
}
public void setNreorder(long value) {
swigfaissJNI.HNSWStats_nreorder_set(swigCPtr, this, value);
}
public long getNreorder() {
return swigfaissJNI.HNSWStats_nreorder_get(swigCPtr, this);
}
public HNSWStats(long n1, long n2, long n3, long ndis, long nreorder) {
this(swigfaissJNI.new_HNSWStats__SWIG_0(n1, n2, n3, ndis, nreorder), true);
}
public HNSWStats(long n1, long n2, long n3, long ndis) {
this(swigfaissJNI.new_HNSWStats__SWIG_1(n1, n2, n3, ndis), true);
}
public HNSWStats(long n1, long n2, long n3) {
this(swigfaissJNI.new_HNSWStats__SWIG_2(n1, n2, n3), true);
}
public HNSWStats(long n1, long n2) {
this(swigfaissJNI.new_HNSWStats__SWIG_3(n1, n2), true);
}
public HNSWStats(long n1) {
this(swigfaissJNI.new_HNSWStats__SWIG_4(n1), true);
}
public HNSWStats() {
this(swigfaissJNI.new_HNSWStats__SWIG_5(), true);
}
public void reset() {
swigfaissJNI.HNSWStats_reset(swigCPtr, this);
}
public void combine(HNSWStats other) {
swigfaissJNI.HNSWStats_combine(swigCPtr, this, HNSWStats.getCPtr(other), other);
}
}

View File

@ -1,86 +0,0 @@
/* ----------------------------------------------------------------------------
* This file was automatically generated by SWIG (http://www.swig.org).
* Version 4.0.2
*
* Do not make changes to this file unless you know what you are doing--modify
* the SWIG interface file instead.
* ----------------------------------------------------------------------------- */
package com.twitter.ann.faiss;
public class HStackInvertedLists extends ReadOnlyInvertedLists {
private transient long swigCPtr;
protected HStackInvertedLists(long cPtr, boolean cMemoryOwn) {
super(swigfaissJNI.HStackInvertedLists_SWIGUpcast(cPtr), cMemoryOwn);
swigCPtr = cPtr;
}
protected static long getCPtr(HStackInvertedLists obj) {
return (obj == null) ? 0 : obj.swigCPtr;
}
@SuppressWarnings("deprecation")
protected void finalize() {
delete();
}
public synchronized void delete() {
if (swigCPtr != 0) {
if (swigCMemOwn) {
swigCMemOwn = false;
swigfaissJNI.delete_HStackInvertedLists(swigCPtr);
}
swigCPtr = 0;
}
super.delete();
}
public void setIls(SWIGTYPE_p_std__vectorT_faiss__InvertedLists_const_p_t value) {
swigfaissJNI.HStackInvertedLists_ils_set(swigCPtr, this, SWIGTYPE_p_std__vectorT_faiss__InvertedLists_const_p_t.getCPtr(value));
}
public SWIGTYPE_p_std__vectorT_faiss__InvertedLists_const_p_t getIls() {
long cPtr = swigfaissJNI.HStackInvertedLists_ils_get(swigCPtr, this);
return (cPtr == 0) ? null : new SWIGTYPE_p_std__vectorT_faiss__InvertedLists_const_p_t(cPtr, false);
}
public HStackInvertedLists(int nil, SWIGTYPE_p_p_faiss__InvertedLists ils) {
this(swigfaissJNI.new_HStackInvertedLists(nil, SWIGTYPE_p_p_faiss__InvertedLists.getCPtr(ils)), true);
}
public long list_size(long list_no) {
return swigfaissJNI.HStackInvertedLists_list_size(swigCPtr, this, list_no);
}
public SWIGTYPE_p_unsigned_char get_codes(long list_no) {
long cPtr = swigfaissJNI.HStackInvertedLists_get_codes(swigCPtr, this, list_no);
return (cPtr == 0) ? null : new SWIGTYPE_p_unsigned_char(cPtr, false);
}
public LongVector get_ids(long list_no) {
return new LongVector(swigfaissJNI.HStackInvertedLists_get_ids(swigCPtr, this, list_no), false);
}
public void prefetch_lists(LongVector list_nos, int nlist) {
swigfaissJNI.HStackInvertedLists_prefetch_lists(swigCPtr, this, SWIGTYPE_p_long_long.getCPtr(list_nos.data()), list_nos, nlist);
}
public void release_codes(long list_no, SWIGTYPE_p_unsigned_char codes) {
swigfaissJNI.HStackInvertedLists_release_codes(swigCPtr, this, list_no, SWIGTYPE_p_unsigned_char.getCPtr(codes));
}
public void release_ids(long list_no, LongVector ids) {
swigfaissJNI.HStackInvertedLists_release_ids(swigCPtr, this, list_no, SWIGTYPE_p_long_long.getCPtr(ids.data()), ids);
}
public long get_single_id(long list_no, long offset) {
return swigfaissJNI.HStackInvertedLists_get_single_id(swigCPtr, this, list_no, offset);
}
public SWIGTYPE_p_unsigned_char get_single_code(long list_no, long offset) {
long cPtr = swigfaissJNI.HStackInvertedLists_get_single_code(swigCPtr, this, list_no, offset);
return (cPtr == 0) ? null : new SWIGTYPE_p_unsigned_char(cPtr, false);
}
}

View File

@ -1,71 +0,0 @@
/* ----------------------------------------------------------------------------
* This file was automatically generated by SWIG (http://www.swig.org).
* Version 4.0.2
*
* Do not make changes to this file unless you know what you are doing--modify
* the SWIG interface file instead.
* ----------------------------------------------------------------------------- */
package com.twitter.ann.faiss;
public class HammingComputer16 {
private transient long swigCPtr;
protected transient boolean swigCMemOwn;
protected HammingComputer16(long cPtr, boolean cMemoryOwn) {
swigCMemOwn = cMemoryOwn;
swigCPtr = cPtr;
}
protected static long getCPtr(HammingComputer16 obj) {
return (obj == null) ? 0 : obj.swigCPtr;
}
@SuppressWarnings("deprecation")
protected void finalize() {
delete();
}
public synchronized void delete() {
if (swigCPtr != 0) {
if (swigCMemOwn) {
swigCMemOwn = false;
swigfaissJNI.delete_HammingComputer16(swigCPtr);
}
swigCPtr = 0;
}
}
public void setA0(long value) {
swigfaissJNI.HammingComputer16_a0_set(swigCPtr, this, value);
}
public long getA0() {
return swigfaissJNI.HammingComputer16_a0_get(swigCPtr, this);
}
public void setA1(long value) {
swigfaissJNI.HammingComputer16_a1_set(swigCPtr, this, value);
}
public long getA1() {
return swigfaissJNI.HammingComputer16_a1_get(swigCPtr, this);
}
public HammingComputer16() {
this(swigfaissJNI.new_HammingComputer16__SWIG_0(), true);
}
public HammingComputer16(SWIGTYPE_p_unsigned_char a8, int code_size) {
this(swigfaissJNI.new_HammingComputer16__SWIG_1(SWIGTYPE_p_unsigned_char.getCPtr(a8), code_size), true);
}
public void set(SWIGTYPE_p_unsigned_char a8, int code_size) {
swigfaissJNI.HammingComputer16_set(swigCPtr, this, SWIGTYPE_p_unsigned_char.getCPtr(a8), code_size);
}
public int hamming(SWIGTYPE_p_unsigned_char b8) {
return swigfaissJNI.HammingComputer16_hamming(swigCPtr, this, SWIGTYPE_p_unsigned_char.getCPtr(b8));
}
}

View File

@ -1,79 +0,0 @@
/* ----------------------------------------------------------------------------
* This file was automatically generated by SWIG (http://www.swig.org).
* Version 4.0.2
*
* Do not make changes to this file unless you know what you are doing--modify
* the SWIG interface file instead.
* ----------------------------------------------------------------------------- */
package com.twitter.ann.faiss;
public class HammingComputer20 {
private transient long swigCPtr;
protected transient boolean swigCMemOwn;
protected HammingComputer20(long cPtr, boolean cMemoryOwn) {
swigCMemOwn = cMemoryOwn;
swigCPtr = cPtr;
}
protected static long getCPtr(HammingComputer20 obj) {
return (obj == null) ? 0 : obj.swigCPtr;
}
@SuppressWarnings("deprecation")
protected void finalize() {
delete();
}
public synchronized void delete() {
if (swigCPtr != 0) {
if (swigCMemOwn) {
swigCMemOwn = false;
swigfaissJNI.delete_HammingComputer20(swigCPtr);
}
swigCPtr = 0;
}
}
public void setA0(long value) {
swigfaissJNI.HammingComputer20_a0_set(swigCPtr, this, value);
}
public long getA0() {
return swigfaissJNI.HammingComputer20_a0_get(swigCPtr, this);
}
public void setA1(long value) {
swigfaissJNI.HammingComputer20_a1_set(swigCPtr, this, value);
}
public long getA1() {
return swigfaissJNI.HammingComputer20_a1_get(swigCPtr, this);
}
public void setA2(SWIGTYPE_p_uint32_t value) {
swigfaissJNI.HammingComputer20_a2_set(swigCPtr, this, SWIGTYPE_p_uint32_t.getCPtr(value));
}
public SWIGTYPE_p_uint32_t getA2() {
return new SWIGTYPE_p_uint32_t(swigfaissJNI.HammingComputer20_a2_get(swigCPtr, this), true);
}
public HammingComputer20() {
this(swigfaissJNI.new_HammingComputer20__SWIG_0(), true);
}
public HammingComputer20(SWIGTYPE_p_unsigned_char a8, int code_size) {
this(swigfaissJNI.new_HammingComputer20__SWIG_1(SWIGTYPE_p_unsigned_char.getCPtr(a8), code_size), true);
}
public void set(SWIGTYPE_p_unsigned_char a8, int code_size) {
swigfaissJNI.HammingComputer20_set(swigCPtr, this, SWIGTYPE_p_unsigned_char.getCPtr(a8), code_size);
}
public int hamming(SWIGTYPE_p_unsigned_char b8) {
return swigfaissJNI.HammingComputer20_hamming(swigCPtr, this, SWIGTYPE_p_unsigned_char.getCPtr(b8));
}
}

View File

@ -1,87 +0,0 @@
/* ----------------------------------------------------------------------------
* This file was automatically generated by SWIG (http://www.swig.org).
* Version 4.0.2
*
* Do not make changes to this file unless you know what you are doing--modify
* the SWIG interface file instead.
* ----------------------------------------------------------------------------- */
package com.twitter.ann.faiss;
public class HammingComputer32 {
private transient long swigCPtr;
protected transient boolean swigCMemOwn;
protected HammingComputer32(long cPtr, boolean cMemoryOwn) {
swigCMemOwn = cMemoryOwn;
swigCPtr = cPtr;
}
protected static long getCPtr(HammingComputer32 obj) {
return (obj == null) ? 0 : obj.swigCPtr;
}
@SuppressWarnings("deprecation")
protected void finalize() {
delete();
}
public synchronized void delete() {
if (swigCPtr != 0) {
if (swigCMemOwn) {
swigCMemOwn = false;
swigfaissJNI.delete_HammingComputer32(swigCPtr);
}
swigCPtr = 0;
}
}
public void setA0(long value) {
swigfaissJNI.HammingComputer32_a0_set(swigCPtr, this, value);
}
public long getA0() {
return swigfaissJNI.HammingComputer32_a0_get(swigCPtr, this);
}
public void setA1(long value) {
swigfaissJNI.HammingComputer32_a1_set(swigCPtr, this, value);
}
public long getA1() {
return swigfaissJNI.HammingComputer32_a1_get(swigCPtr, this);
}
public void setA2(long value) {
swigfaissJNI.HammingComputer32_a2_set(swigCPtr, this, value);
}
public long getA2() {
return swigfaissJNI.HammingComputer32_a2_get(swigCPtr, this);
}
public void setA3(long value) {
swigfaissJNI.HammingComputer32_a3_set(swigCPtr, this, value);
}
public long getA3() {
return swigfaissJNI.HammingComputer32_a3_get(swigCPtr, this);
}
public HammingComputer32() {
this(swigfaissJNI.new_HammingComputer32__SWIG_0(), true);
}
public HammingComputer32(SWIGTYPE_p_unsigned_char a8, int code_size) {
this(swigfaissJNI.new_HammingComputer32__SWIG_1(SWIGTYPE_p_unsigned_char.getCPtr(a8), code_size), true);
}
public void set(SWIGTYPE_p_unsigned_char a8, int code_size) {
swigfaissJNI.HammingComputer32_set(swigCPtr, this, SWIGTYPE_p_unsigned_char.getCPtr(a8), code_size);
}
public int hamming(SWIGTYPE_p_unsigned_char b8) {
return swigfaissJNI.HammingComputer32_hamming(swigCPtr, this, SWIGTYPE_p_unsigned_char.getCPtr(b8));
}
}

View File

@ -1,63 +0,0 @@
/* ----------------------------------------------------------------------------
* This file was automatically generated by SWIG (http://www.swig.org).
* Version 4.0.2
*
* Do not make changes to this file unless you know what you are doing--modify
* the SWIG interface file instead.
* ----------------------------------------------------------------------------- */
package com.twitter.ann.faiss;
public class HammingComputer4 {
private transient long swigCPtr;
protected transient boolean swigCMemOwn;
protected HammingComputer4(long cPtr, boolean cMemoryOwn) {
swigCMemOwn = cMemoryOwn;
swigCPtr = cPtr;
}
protected static long getCPtr(HammingComputer4 obj) {
return (obj == null) ? 0 : obj.swigCPtr;
}
@SuppressWarnings("deprecation")
protected void finalize() {
delete();
}
public synchronized void delete() {
if (swigCPtr != 0) {
if (swigCMemOwn) {
swigCMemOwn = false;
swigfaissJNI.delete_HammingComputer4(swigCPtr);
}
swigCPtr = 0;
}
}
public void setA0(SWIGTYPE_p_uint32_t value) {
swigfaissJNI.HammingComputer4_a0_set(swigCPtr, this, SWIGTYPE_p_uint32_t.getCPtr(value));
}
public SWIGTYPE_p_uint32_t getA0() {
return new SWIGTYPE_p_uint32_t(swigfaissJNI.HammingComputer4_a0_get(swigCPtr, this), true);
}
public HammingComputer4() {
this(swigfaissJNI.new_HammingComputer4__SWIG_0(), true);
}
public HammingComputer4(SWIGTYPE_p_unsigned_char a, int code_size) {
this(swigfaissJNI.new_HammingComputer4__SWIG_1(SWIGTYPE_p_unsigned_char.getCPtr(a), code_size), true);
}
public void set(SWIGTYPE_p_unsigned_char a, int code_size) {
swigfaissJNI.HammingComputer4_set(swigCPtr, this, SWIGTYPE_p_unsigned_char.getCPtr(a), code_size);
}
public int hamming(SWIGTYPE_p_unsigned_char b) {
return swigfaissJNI.HammingComputer4_hamming(swigCPtr, this, SWIGTYPE_p_unsigned_char.getCPtr(b));
}
}

View File

@ -1,119 +0,0 @@
/* ----------------------------------------------------------------------------
* This file was automatically generated by SWIG (http://www.swig.org).
* Version 4.0.2
*
* Do not make changes to this file unless you know what you are doing--modify
* the SWIG interface file instead.
* ----------------------------------------------------------------------------- */
package com.twitter.ann.faiss;
public class HammingComputer64 {
private transient long swigCPtr;
protected transient boolean swigCMemOwn;
protected HammingComputer64(long cPtr, boolean cMemoryOwn) {
swigCMemOwn = cMemoryOwn;
swigCPtr = cPtr;
}
protected static long getCPtr(HammingComputer64 obj) {
return (obj == null) ? 0 : obj.swigCPtr;
}
@SuppressWarnings("deprecation")
protected void finalize() {
delete();
}
public synchronized void delete() {
if (swigCPtr != 0) {
if (swigCMemOwn) {
swigCMemOwn = false;
swigfaissJNI.delete_HammingComputer64(swigCPtr);
}
swigCPtr = 0;
}
}
public void setA0(long value) {
swigfaissJNI.HammingComputer64_a0_set(swigCPtr, this, value);
}
public long getA0() {
return swigfaissJNI.HammingComputer64_a0_get(swigCPtr, this);
}
public void setA1(long value) {
swigfaissJNI.HammingComputer64_a1_set(swigCPtr, this, value);
}
public long getA1() {
return swigfaissJNI.HammingComputer64_a1_get(swigCPtr, this);
}
public void setA2(long value) {
swigfaissJNI.HammingComputer64_a2_set(swigCPtr, this, value);
}
public long getA2() {
return swigfaissJNI.HammingComputer64_a2_get(swigCPtr, this);
}
public void setA3(long value) {
swigfaissJNI.HammingComputer64_a3_set(swigCPtr, this, value);
}
public long getA3() {
return swigfaissJNI.HammingComputer64_a3_get(swigCPtr, this);
}
public void setA4(long value) {
swigfaissJNI.HammingComputer64_a4_set(swigCPtr, this, value);
}
public long getA4() {
return swigfaissJNI.HammingComputer64_a4_get(swigCPtr, this);
}
public void setA5(long value) {
swigfaissJNI.HammingComputer64_a5_set(swigCPtr, this, value);
}
public long getA5() {
return swigfaissJNI.HammingComputer64_a5_get(swigCPtr, this);
}
public void setA6(long value) {
swigfaissJNI.HammingComputer64_a6_set(swigCPtr, this, value);
}
public long getA6() {
return swigfaissJNI.HammingComputer64_a6_get(swigCPtr, this);
}
public void setA7(long value) {
swigfaissJNI.HammingComputer64_a7_set(swigCPtr, this, value);
}
public long getA7() {
return swigfaissJNI.HammingComputer64_a7_get(swigCPtr, this);
}
public HammingComputer64() {
this(swigfaissJNI.new_HammingComputer64__SWIG_0(), true);
}
public HammingComputer64(SWIGTYPE_p_unsigned_char a8, int code_size) {
this(swigfaissJNI.new_HammingComputer64__SWIG_1(SWIGTYPE_p_unsigned_char.getCPtr(a8), code_size), true);
}
public void set(SWIGTYPE_p_unsigned_char a8, int code_size) {
swigfaissJNI.HammingComputer64_set(swigCPtr, this, SWIGTYPE_p_unsigned_char.getCPtr(a8), code_size);
}
public int hamming(SWIGTYPE_p_unsigned_char b8) {
return swigfaissJNI.HammingComputer64_hamming(swigCPtr, this, SWIGTYPE_p_unsigned_char.getCPtr(b8));
}
}

View File

@ -1,63 +0,0 @@
/* ----------------------------------------------------------------------------
* This file was automatically generated by SWIG (http://www.swig.org).
* Version 4.0.2
*
* Do not make changes to this file unless you know what you are doing--modify
* the SWIG interface file instead.
* ----------------------------------------------------------------------------- */
package com.twitter.ann.faiss;
public class HammingComputer8 {
private transient long swigCPtr;
protected transient boolean swigCMemOwn;
protected HammingComputer8(long cPtr, boolean cMemoryOwn) {
swigCMemOwn = cMemoryOwn;
swigCPtr = cPtr;
}
protected static long getCPtr(HammingComputer8 obj) {
return (obj == null) ? 0 : obj.swigCPtr;
}
@SuppressWarnings("deprecation")
protected void finalize() {
delete();
}
public synchronized void delete() {
if (swigCPtr != 0) {
if (swigCMemOwn) {
swigCMemOwn = false;
swigfaissJNI.delete_HammingComputer8(swigCPtr);
}
swigCPtr = 0;
}
}
public void setA0(long value) {
swigfaissJNI.HammingComputer8_a0_set(swigCPtr, this, value);
}
public long getA0() {
return swigfaissJNI.HammingComputer8_a0_get(swigCPtr, this);
}
public HammingComputer8() {
this(swigfaissJNI.new_HammingComputer8__SWIG_0(), true);
}
public HammingComputer8(SWIGTYPE_p_unsigned_char a, int code_size) {
this(swigfaissJNI.new_HammingComputer8__SWIG_1(SWIGTYPE_p_unsigned_char.getCPtr(a), code_size), true);
}
public void set(SWIGTYPE_p_unsigned_char a, int code_size) {
swigfaissJNI.HammingComputer8_set(swigCPtr, this, SWIGTYPE_p_unsigned_char.getCPtr(a), code_size);
}
public int hamming(SWIGTYPE_p_unsigned_char b) {
return swigfaissJNI.HammingComputer8_hamming(swigCPtr, this, SWIGTYPE_p_unsigned_char.getCPtr(b));
}
}

View File

@ -1,80 +0,0 @@
/* ----------------------------------------------------------------------------
* This file was automatically generated by SWIG (http://www.swig.org).
* Version 4.0.2
*
* Do not make changes to this file unless you know what you are doing--modify
* the SWIG interface file instead.
* ----------------------------------------------------------------------------- */
package com.twitter.ann.faiss;
public class HammingComputerDefault {
private transient long swigCPtr;
protected transient boolean swigCMemOwn;
protected HammingComputerDefault(long cPtr, boolean cMemoryOwn) {
swigCMemOwn = cMemoryOwn;
swigCPtr = cPtr;
}
protected static long getCPtr(HammingComputerDefault obj) {
return (obj == null) ? 0 : obj.swigCPtr;
}
@SuppressWarnings("deprecation")
protected void finalize() {
delete();
}
public synchronized void delete() {
if (swigCPtr != 0) {
if (swigCMemOwn) {
swigCMemOwn = false;
swigfaissJNI.delete_HammingComputerDefault(swigCPtr);
}
swigCPtr = 0;
}
}
public void setA8(SWIGTYPE_p_unsigned_char value) {
swigfaissJNI.HammingComputerDefault_a8_set(swigCPtr, this, SWIGTYPE_p_unsigned_char.getCPtr(value));
}
public SWIGTYPE_p_unsigned_char getA8() {
long cPtr = swigfaissJNI.HammingComputerDefault_a8_get(swigCPtr, this);
return (cPtr == 0) ? null : new SWIGTYPE_p_unsigned_char(cPtr, false);
}
public void setQuotient8(int value) {
swigfaissJNI.HammingComputerDefault_quotient8_set(swigCPtr, this, value);
}
public int getQuotient8() {
return swigfaissJNI.HammingComputerDefault_quotient8_get(swigCPtr, this);
}
public void setRemainder8(int value) {
swigfaissJNI.HammingComputerDefault_remainder8_set(swigCPtr, this, value);
}
public int getRemainder8() {
return swigfaissJNI.HammingComputerDefault_remainder8_get(swigCPtr, this);
}
public HammingComputerDefault() {
this(swigfaissJNI.new_HammingComputerDefault__SWIG_0(), true);
}
public HammingComputerDefault(SWIGTYPE_p_unsigned_char a8, int code_size) {
this(swigfaissJNI.new_HammingComputerDefault__SWIG_1(SWIGTYPE_p_unsigned_char.getCPtr(a8), code_size), true);
}
public void set(SWIGTYPE_p_unsigned_char a8, int code_size) {
swigfaissJNI.HammingComputerDefault_set(swigCPtr, this, SWIGTYPE_p_unsigned_char.getCPtr(a8), code_size);
}
public int hamming(SWIGTYPE_p_unsigned_char b8) {
return swigfaissJNI.HammingComputerDefault_hamming(swigCPtr, this, SWIGTYPE_p_unsigned_char.getCPtr(b8));
}
}

View File

@ -1,72 +0,0 @@
/* ----------------------------------------------------------------------------
* This file was automatically generated by SWIG (http://www.swig.org).
* Version 4.0.2
*
* Do not make changes to this file unless you know what you are doing--modify
* the SWIG interface file instead.
* ----------------------------------------------------------------------------- */
package com.twitter.ann.faiss;
public class HammingComputerM4 {
private transient long swigCPtr;
protected transient boolean swigCMemOwn;
protected HammingComputerM4(long cPtr, boolean cMemoryOwn) {
swigCMemOwn = cMemoryOwn;
swigCPtr = cPtr;
}
protected static long getCPtr(HammingComputerM4 obj) {
return (obj == null) ? 0 : obj.swigCPtr;
}
@SuppressWarnings("deprecation")
protected void finalize() {
delete();
}
public synchronized void delete() {
if (swigCPtr != 0) {
if (swigCMemOwn) {
swigCMemOwn = false;
swigfaissJNI.delete_HammingComputerM4(swigCPtr);
}
swigCPtr = 0;
}
}
public void setA(SWIGTYPE_p_uint32_t value) {
swigfaissJNI.HammingComputerM4_a_set(swigCPtr, this, SWIGTYPE_p_uint32_t.getCPtr(value));
}
public SWIGTYPE_p_uint32_t getA() {
long cPtr = swigfaissJNI.HammingComputerM4_a_get(swigCPtr, this);
return (cPtr == 0) ? null : new SWIGTYPE_p_uint32_t(cPtr, false);
}
public void setN(int value) {
swigfaissJNI.HammingComputerM4_n_set(swigCPtr, this, value);
}
public int getN() {
return swigfaissJNI.HammingComputerM4_n_get(swigCPtr, this);
}
public HammingComputerM4() {
this(swigfaissJNI.new_HammingComputerM4__SWIG_0(), true);
}
public HammingComputerM4(SWIGTYPE_p_unsigned_char a4, int code_size) {
this(swigfaissJNI.new_HammingComputerM4__SWIG_1(SWIGTYPE_p_unsigned_char.getCPtr(a4), code_size), true);
}
public void set(SWIGTYPE_p_unsigned_char a4, int code_size) {
swigfaissJNI.HammingComputerM4_set(swigCPtr, this, SWIGTYPE_p_unsigned_char.getCPtr(a4), code_size);
}
public int hamming(SWIGTYPE_p_unsigned_char b8) {
return swigfaissJNI.HammingComputerM4_hamming(swigCPtr, this, SWIGTYPE_p_unsigned_char.getCPtr(b8));
}
}

View File

@ -1,72 +0,0 @@
/* ----------------------------------------------------------------------------
* This file was automatically generated by SWIG (http://www.swig.org).
* Version 4.0.2
*
* Do not make changes to this file unless you know what you are doing--modify
* the SWIG interface file instead.
* ----------------------------------------------------------------------------- */
package com.twitter.ann.faiss;
public class HammingComputerM8 {
private transient long swigCPtr;
protected transient boolean swigCMemOwn;
protected HammingComputerM8(long cPtr, boolean cMemoryOwn) {
swigCMemOwn = cMemoryOwn;
swigCPtr = cPtr;
}
protected static long getCPtr(HammingComputerM8 obj) {
return (obj == null) ? 0 : obj.swigCPtr;
}
@SuppressWarnings("deprecation")
protected void finalize() {
delete();
}
public synchronized void delete() {
if (swigCPtr != 0) {
if (swigCMemOwn) {
swigCMemOwn = false;
swigfaissJNI.delete_HammingComputerM8(swigCPtr);
}
swigCPtr = 0;
}
}
public void setA(SWIGTYPE_p_unsigned_long value) {
swigfaissJNI.HammingComputerM8_a_set(swigCPtr, this, SWIGTYPE_p_unsigned_long.getCPtr(value));
}
public SWIGTYPE_p_unsigned_long getA() {
long cPtr = swigfaissJNI.HammingComputerM8_a_get(swigCPtr, this);
return (cPtr == 0) ? null : new SWIGTYPE_p_unsigned_long(cPtr, false);
}
public void setN(int value) {
swigfaissJNI.HammingComputerM8_n_set(swigCPtr, this, value);
}
public int getN() {
return swigfaissJNI.HammingComputerM8_n_get(swigCPtr, this);
}
public HammingComputerM8() {
this(swigfaissJNI.new_HammingComputerM8__SWIG_0(), true);
}
public HammingComputerM8(SWIGTYPE_p_unsigned_char a8, int code_size) {
this(swigfaissJNI.new_HammingComputerM8__SWIG_1(SWIGTYPE_p_unsigned_char.getCPtr(a8), code_size), true);
}
public void set(SWIGTYPE_p_unsigned_char a8, int code_size) {
swigfaissJNI.HammingComputerM8_set(swigCPtr, this, SWIGTYPE_p_unsigned_char.getCPtr(a8), code_size);
}
public int hamming(SWIGTYPE_p_unsigned_char b8) {
return swigfaissJNI.HammingComputerM8_hamming(swigCPtr, this, SWIGTYPE_p_unsigned_char.getCPtr(b8));
}
}

View File

@ -1,43 +0,0 @@
/* ----------------------------------------------------------------------------
* This file was automatically generated by SWIG (http://www.swig.org).
* Version 4.0.2
*
* Do not make changes to this file unless you know what you are doing--modify
* the SWIG interface file instead.
* ----------------------------------------------------------------------------- */
package com.twitter.ann.faiss;
public class IDSelector {
private transient long swigCPtr;
protected transient boolean swigCMemOwn;
protected IDSelector(long cPtr, boolean cMemoryOwn) {
swigCMemOwn = cMemoryOwn;
swigCPtr = cPtr;
}
protected static long getCPtr(IDSelector obj) {
return (obj == null) ? 0 : obj.swigCPtr;
}
@SuppressWarnings("deprecation")
protected void finalize() {
delete();
}
public synchronized void delete() {
if (swigCPtr != 0) {
if (swigCMemOwn) {
swigCMemOwn = false;
swigfaissJNI.delete_IDSelector(swigCPtr);
}
swigCPtr = 0;
}
}
public boolean is_member(long id) {
return swigfaissJNI.IDSelector_is_member(swigCPtr, this, id);
}
}

View File

@ -1,63 +0,0 @@
/* ----------------------------------------------------------------------------
* This file was automatically generated by SWIG (http://www.swig.org).
* Version 4.0.2
*
* Do not make changes to this file unless you know what you are doing--modify
* the SWIG interface file instead.
* ----------------------------------------------------------------------------- */
package com.twitter.ann.faiss;
public class IDSelectorArray extends IDSelector {
private transient long swigCPtr;
protected IDSelectorArray(long cPtr, boolean cMemoryOwn) {
super(swigfaissJNI.IDSelectorArray_SWIGUpcast(cPtr), cMemoryOwn);
swigCPtr = cPtr;
}
protected static long getCPtr(IDSelectorArray obj) {
return (obj == null) ? 0 : obj.swigCPtr;
}
@SuppressWarnings("deprecation")
protected void finalize() {
delete();
}
public synchronized void delete() {
if (swigCPtr != 0) {
if (swigCMemOwn) {
swigCMemOwn = false;
swigfaissJNI.delete_IDSelectorArray(swigCPtr);
}
swigCPtr = 0;
}
super.delete();
}
public void setN(long value) {
swigfaissJNI.IDSelectorArray_n_set(swigCPtr, this, value);
}
public long getN() {
return swigfaissJNI.IDSelectorArray_n_get(swigCPtr, this);
}
public void setIds(LongVector value) {
swigfaissJNI.IDSelectorArray_ids_set(swigCPtr, this, SWIGTYPE_p_long_long.getCPtr(value.data()), value);
}
public LongVector getIds() {
return new LongVector(swigfaissJNI.IDSelectorArray_ids_get(swigCPtr, this), false);
}
public IDSelectorArray(long n, LongVector ids) {
this(swigfaissJNI.new_IDSelectorArray(n, SWIGTYPE_p_long_long.getCPtr(ids.data()), ids), true);
}
public boolean is_member(long id) {
return swigfaissJNI.IDSelectorArray_is_member(swigCPtr, this, id);
}
}

View File

@ -1,63 +0,0 @@
/* ----------------------------------------------------------------------------
* This file was automatically generated by SWIG (http://www.swig.org).
* Version 4.0.2
*
* Do not make changes to this file unless you know what you are doing--modify
* the SWIG interface file instead.
* ----------------------------------------------------------------------------- */
package com.twitter.ann.faiss;
public class IDSelectorBatch extends IDSelector {
private transient long swigCPtr;
protected IDSelectorBatch(long cPtr, boolean cMemoryOwn) {
super(swigfaissJNI.IDSelectorBatch_SWIGUpcast(cPtr), cMemoryOwn);
swigCPtr = cPtr;
}
protected static long getCPtr(IDSelectorBatch obj) {
return (obj == null) ? 0 : obj.swigCPtr;
}
@SuppressWarnings("deprecation")
protected void finalize() {
delete();
}
public synchronized void delete() {
if (swigCPtr != 0) {
if (swigCMemOwn) {
swigCMemOwn = false;
swigfaissJNI.delete_IDSelectorBatch(swigCPtr);
}
swigCPtr = 0;
}
super.delete();
}
public void setNbits(int value) {
swigfaissJNI.IDSelectorBatch_nbits_set(swigCPtr, this, value);
}
public int getNbits() {
return swigfaissJNI.IDSelectorBatch_nbits_get(swigCPtr, this);
}
public void setMask(long value) {
swigfaissJNI.IDSelectorBatch_mask_set(swigCPtr, this, value);
}
public long getMask() {
return swigfaissJNI.IDSelectorBatch_mask_get(swigCPtr, this);
}
public IDSelectorBatch(long n, LongVector indices) {
this(swigfaissJNI.new_IDSelectorBatch(n, SWIGTYPE_p_long_long.getCPtr(indices.data()), indices), true);
}
public boolean is_member(long id) {
return swigfaissJNI.IDSelectorBatch_is_member(swigCPtr, this, id);
}
}

View File

@ -1,63 +0,0 @@
/* ----------------------------------------------------------------------------
* This file was automatically generated by SWIG (http://www.swig.org).
* Version 4.0.2
*
* Do not make changes to this file unless you know what you are doing--modify
* the SWIG interface file instead.
* ----------------------------------------------------------------------------- */
package com.twitter.ann.faiss;
public class IDSelectorRange extends IDSelector {
private transient long swigCPtr;
protected IDSelectorRange(long cPtr, boolean cMemoryOwn) {
super(swigfaissJNI.IDSelectorRange_SWIGUpcast(cPtr), cMemoryOwn);
swigCPtr = cPtr;
}
protected static long getCPtr(IDSelectorRange obj) {
return (obj == null) ? 0 : obj.swigCPtr;
}
@SuppressWarnings("deprecation")
protected void finalize() {
delete();
}
public synchronized void delete() {
if (swigCPtr != 0) {
if (swigCMemOwn) {
swigCMemOwn = false;
swigfaissJNI.delete_IDSelectorRange(swigCPtr);
}
swigCPtr = 0;
}
super.delete();
}
public void setImin(long value) {
swigfaissJNI.IDSelectorRange_imin_set(swigCPtr, this, value);
}
public long getImin() {
return swigfaissJNI.IDSelectorRange_imin_get(swigCPtr, this);
}
public void setImax(long value) {
swigfaissJNI.IDSelectorRange_imax_set(swigCPtr, this, value);
}
public long getImax() {
return swigfaissJNI.IDSelectorRange_imax_get(swigCPtr, this);
}
public IDSelectorRange(long imin, long imax) {
this(swigfaissJNI.new_IDSelectorRange(imin, imax), true);
}
public boolean is_member(long id) {
return swigfaissJNI.IDSelectorRange_is_member(swigCPtr, this, id);
}
}

View File

@ -1,76 +0,0 @@
/* ----------------------------------------------------------------------------
* This file was automatically generated by SWIG (http://www.swig.org).
* Version 4.0.2
*
* Do not make changes to this file unless you know what you are doing--modify
* the SWIG interface file instead.
* ----------------------------------------------------------------------------- */
package com.twitter.ann.faiss;
public class ITQMatrix extends LinearTransform {
private transient long swigCPtr;
protected ITQMatrix(long cPtr, boolean cMemoryOwn) {
super(swigfaissJNI.ITQMatrix_SWIGUpcast(cPtr), cMemoryOwn);
swigCPtr = cPtr;
}
protected static long getCPtr(ITQMatrix obj) {
return (obj == null) ? 0 : obj.swigCPtr;
}
@SuppressWarnings("deprecation")
protected void finalize() {
delete();
}
public synchronized void delete() {
if (swigCPtr != 0) {
if (swigCMemOwn) {
swigCMemOwn = false;
swigfaissJNI.delete_ITQMatrix(swigCPtr);
}
swigCPtr = 0;
}
super.delete();
}
public void setMax_iter(int value) {
swigfaissJNI.ITQMatrix_max_iter_set(swigCPtr, this, value);
}
public int getMax_iter() {
return swigfaissJNI.ITQMatrix_max_iter_get(swigCPtr, this);
}
public void setSeed(int value) {
swigfaissJNI.ITQMatrix_seed_set(swigCPtr, this, value);
}
public int getSeed() {
return swigfaissJNI.ITQMatrix_seed_get(swigCPtr, this);
}
public void setInit_rotation(DoubleVector value) {
swigfaissJNI.ITQMatrix_init_rotation_set(swigCPtr, this, DoubleVector.getCPtr(value), value);
}
public DoubleVector getInit_rotation() {
long cPtr = swigfaissJNI.ITQMatrix_init_rotation_get(swigCPtr, this);
return (cPtr == 0) ? null : new DoubleVector(cPtr, false);
}
public ITQMatrix(int d) {
this(swigfaissJNI.new_ITQMatrix__SWIG_0(d), true);
}
public ITQMatrix() {
this(swigfaissJNI.new_ITQMatrix__SWIG_1(), true);
}
public void train(long n, SWIGTYPE_p_float x) {
swigfaissJNI.ITQMatrix_train(swigCPtr, this, n, SWIGTYPE_p_float.getCPtr(x));
}
}

View File

@ -1,106 +0,0 @@
/* ----------------------------------------------------------------------------
* This file was automatically generated by SWIG (http://www.swig.org).
* Version 4.0.2
*
* Do not make changes to this file unless you know what you are doing--modify
* the SWIG interface file instead.
* ----------------------------------------------------------------------------- */
package com.twitter.ann.faiss;
public class ITQTransform extends VectorTransform {
private transient long swigCPtr;
protected ITQTransform(long cPtr, boolean cMemoryOwn) {
super(swigfaissJNI.ITQTransform_SWIGUpcast(cPtr), cMemoryOwn);
swigCPtr = cPtr;
}
protected static long getCPtr(ITQTransform obj) {
return (obj == null) ? 0 : obj.swigCPtr;
}
@SuppressWarnings("deprecation")
protected void finalize() {
delete();
}
public synchronized void delete() {
if (swigCPtr != 0) {
if (swigCMemOwn) {
swigCMemOwn = false;
swigfaissJNI.delete_ITQTransform(swigCPtr);
}
swigCPtr = 0;
}
super.delete();
}
public void setMean(FloatVector value) {
swigfaissJNI.ITQTransform_mean_set(swigCPtr, this, FloatVector.getCPtr(value), value);
}
public FloatVector getMean() {
long cPtr = swigfaissJNI.ITQTransform_mean_get(swigCPtr, this);
return (cPtr == 0) ? null : new FloatVector(cPtr, false);
}
public void setDo_pca(boolean value) {
swigfaissJNI.ITQTransform_do_pca_set(swigCPtr, this, value);
}
public boolean getDo_pca() {
return swigfaissJNI.ITQTransform_do_pca_get(swigCPtr, this);
}
public void setItq(ITQMatrix value) {
swigfaissJNI.ITQTransform_itq_set(swigCPtr, this, ITQMatrix.getCPtr(value), value);
}
public ITQMatrix getItq() {
long cPtr = swigfaissJNI.ITQTransform_itq_get(swigCPtr, this);
return (cPtr == 0) ? null : new ITQMatrix(cPtr, false);
}
public void setMax_train_per_dim(int value) {
swigfaissJNI.ITQTransform_max_train_per_dim_set(swigCPtr, this, value);
}
public int getMax_train_per_dim() {
return swigfaissJNI.ITQTransform_max_train_per_dim_get(swigCPtr, this);
}
public void setPca_then_itq(LinearTransform value) {
swigfaissJNI.ITQTransform_pca_then_itq_set(swigCPtr, this, LinearTransform.getCPtr(value), value);
}
public LinearTransform getPca_then_itq() {
long cPtr = swigfaissJNI.ITQTransform_pca_then_itq_get(swigCPtr, this);
return (cPtr == 0) ? null : new LinearTransform(cPtr, false);
}
public ITQTransform(int d_in, int d_out, boolean do_pca) {
this(swigfaissJNI.new_ITQTransform__SWIG_0(d_in, d_out, do_pca), true);
}
public ITQTransform(int d_in, int d_out) {
this(swigfaissJNI.new_ITQTransform__SWIG_1(d_in, d_out), true);
}
public ITQTransform(int d_in) {
this(swigfaissJNI.new_ITQTransform__SWIG_2(d_in), true);
}
public ITQTransform() {
this(swigfaissJNI.new_ITQTransform__SWIG_3(), true);
}
public void train(long n, SWIGTYPE_p_float x) {
swigfaissJNI.ITQTransform_train(swigCPtr, this, n, SWIGTYPE_p_float.getCPtr(x));
}
public void apply_noalloc(long n, SWIGTYPE_p_float x, SWIGTYPE_p_float xt) {
swigfaissJNI.ITQTransform_apply_noalloc(swigCPtr, this, n, SWIGTYPE_p_float.getCPtr(x), SWIGTYPE_p_float.getCPtr(xt));
}
}

View File

@ -1,59 +0,0 @@
/* ----------------------------------------------------------------------------
* This file was automatically generated by SWIG (http://www.swig.org).
* Version 4.0.2
*
* Do not make changes to this file unless you know what you are doing--modify
* the SWIG interface file instead.
* ----------------------------------------------------------------------------- */
package com.twitter.ann.faiss;
public class IVFPQSearchParameters extends IVFSearchParameters {
private transient long swigCPtr;
protected IVFPQSearchParameters(long cPtr, boolean cMemoryOwn) {
super(swigfaissJNI.IVFPQSearchParameters_SWIGUpcast(cPtr), cMemoryOwn);
swigCPtr = cPtr;
}
protected static long getCPtr(IVFPQSearchParameters obj) {
return (obj == null) ? 0 : obj.swigCPtr;
}
@SuppressWarnings("deprecation")
protected void finalize() {
delete();
}
public synchronized void delete() {
if (swigCPtr != 0) {
if (swigCMemOwn) {
swigCMemOwn = false;
swigfaissJNI.delete_IVFPQSearchParameters(swigCPtr);
}
swigCPtr = 0;
}
super.delete();
}
public void setScan_table_threshold(long value) {
swigfaissJNI.IVFPQSearchParameters_scan_table_threshold_set(swigCPtr, this, value);
}
public long getScan_table_threshold() {
return swigfaissJNI.IVFPQSearchParameters_scan_table_threshold_get(swigCPtr, this);
}
public void setPolysemous_ht(int value) {
swigfaissJNI.IVFPQSearchParameters_polysemous_ht_set(swigCPtr, this, value);
}
public int getPolysemous_ht() {
return swigfaissJNI.IVFPQSearchParameters_polysemous_ht_get(swigCPtr, this);
}
public IVFPQSearchParameters() {
this(swigfaissJNI.new_IVFPQSearchParameters(), true);
}
}

View File

@ -1,59 +0,0 @@
/* ----------------------------------------------------------------------------
* This file was automatically generated by SWIG (http://www.swig.org).
* Version 4.0.2
*
* Do not make changes to this file unless you know what you are doing--modify
* the SWIG interface file instead.
* ----------------------------------------------------------------------------- */
package com.twitter.ann.faiss;
public class IVFSearchParameters {
private transient long swigCPtr;
protected transient boolean swigCMemOwn;
protected IVFSearchParameters(long cPtr, boolean cMemoryOwn) {
swigCMemOwn = cMemoryOwn;
swigCPtr = cPtr;
}
protected static long getCPtr(IVFSearchParameters obj) {
return (obj == null) ? 0 : obj.swigCPtr;
}
@SuppressWarnings("deprecation")
protected void finalize() {
delete();
}
public synchronized void delete() {
if (swigCPtr != 0) {
if (swigCMemOwn) {
swigCMemOwn = false;
swigfaissJNI.delete_IVFSearchParameters(swigCPtr);
}
swigCPtr = 0;
}
}
public void setNprobe(long value) {
swigfaissJNI.IVFSearchParameters_nprobe_set(swigCPtr, this, value);
}
public long getNprobe() {
return swigfaissJNI.IVFSearchParameters_nprobe_get(swigCPtr, this);
}
public void setMax_codes(long value) {
swigfaissJNI.IVFSearchParameters_max_codes_set(swigCPtr, this, value);
}
public long getMax_codes() {
return swigfaissJNI.IVFSearchParameters_max_codes_get(swigCPtr, this);
}
public IVFSearchParameters() {
this(swigfaissJNI.new_IVFSearchParameters(), true);
}
}

View File

@ -1,165 +0,0 @@
/* ----------------------------------------------------------------------------
* This file was automatically generated by SWIG (http://www.swig.org).
* Version 4.0.2
*
* Do not make changes to this file unless you know what you are doing--modify
* the SWIG interface file instead.
* ----------------------------------------------------------------------------- */
package com.twitter.ann.faiss;
public class Index {
private transient long swigCPtr;
protected transient boolean swigCMemOwn;
protected Index(long cPtr, boolean cMemoryOwn) {
swigCMemOwn = cMemoryOwn;
swigCPtr = cPtr;
}
protected static long getCPtr(Index obj) {
return (obj == null) ? 0 : obj.swigCPtr;
}
@SuppressWarnings("deprecation")
protected void finalize() {
delete();
}
public synchronized void delete() {
if (swigCPtr != 0) {
if (swigCMemOwn) {
swigCMemOwn = false;
swigfaissJNI.delete_Index(swigCPtr);
}
swigCPtr = 0;
}
}
public void setD(int value) {
swigfaissJNI.Index_d_set(swigCPtr, this, value);
}
public int getD() {
return swigfaissJNI.Index_d_get(swigCPtr, this);
}
public void setNtotal(long value) {
swigfaissJNI.Index_ntotal_set(swigCPtr, this, value);
}
public long getNtotal() {
return swigfaissJNI.Index_ntotal_get(swigCPtr, this);
}
public void setVerbose(boolean value) {
swigfaissJNI.Index_verbose_set(swigCPtr, this, value);
}
public boolean getVerbose() {
return swigfaissJNI.Index_verbose_get(swigCPtr, this);
}
public void setIs_trained(boolean value) {
swigfaissJNI.Index_is_trained_set(swigCPtr, this, value);
}
public boolean getIs_trained() {
return swigfaissJNI.Index_is_trained_get(swigCPtr, this);
}
public void setMetric_type(MetricType value) {
swigfaissJNI.Index_metric_type_set(swigCPtr, this, value.swigValue());
}
public MetricType getMetric_type() {
return MetricType.swigToEnum(swigfaissJNI.Index_metric_type_get(swigCPtr, this));
}
public void setMetric_arg(float value) {
swigfaissJNI.Index_metric_arg_set(swigCPtr, this, value);
}
public float getMetric_arg() {
return swigfaissJNI.Index_metric_arg_get(swigCPtr, this);
}
public void train(long n, SWIGTYPE_p_float x) {
swigfaissJNI.Index_train(swigCPtr, this, n, SWIGTYPE_p_float.getCPtr(x));
}
public void add(long n, SWIGTYPE_p_float x) {
swigfaissJNI.Index_add(swigCPtr, this, n, SWIGTYPE_p_float.getCPtr(x));
}
public void add_with_ids(long n, SWIGTYPE_p_float x, LongVector xids) {
swigfaissJNI.Index_add_with_ids(swigCPtr, this, n, SWIGTYPE_p_float.getCPtr(x), SWIGTYPE_p_long_long.getCPtr(xids.data()), xids);
}
public void search(long n, SWIGTYPE_p_float x, long k, SWIGTYPE_p_float distances, LongVector labels) {
swigfaissJNI.Index_search(swigCPtr, this, n, SWIGTYPE_p_float.getCPtr(x), k, SWIGTYPE_p_float.getCPtr(distances), SWIGTYPE_p_long_long.getCPtr(labels.data()), labels);
}
public void range_search(long n, SWIGTYPE_p_float x, float radius, RangeSearchResult result) {
swigfaissJNI.Index_range_search(swigCPtr, this, n, SWIGTYPE_p_float.getCPtr(x), radius, RangeSearchResult.getCPtr(result), result);
}
public void assign(long n, SWIGTYPE_p_float x, LongVector labels, long k) {
swigfaissJNI.Index_assign__SWIG_0(swigCPtr, this, n, SWIGTYPE_p_float.getCPtr(x), SWIGTYPE_p_long_long.getCPtr(labels.data()), labels, k);
}
public void assign(long n, SWIGTYPE_p_float x, LongVector labels) {
swigfaissJNI.Index_assign__SWIG_1(swigCPtr, this, n, SWIGTYPE_p_float.getCPtr(x), SWIGTYPE_p_long_long.getCPtr(labels.data()), labels);
}
public void reset() {
swigfaissJNI.Index_reset(swigCPtr, this);
}
public long remove_ids(IDSelector sel) {
return swigfaissJNI.Index_remove_ids(swigCPtr, this, IDSelector.getCPtr(sel), sel);
}
public void reconstruct(long key, SWIGTYPE_p_float recons) {
swigfaissJNI.Index_reconstruct(swigCPtr, this, key, SWIGTYPE_p_float.getCPtr(recons));
}
public void reconstruct_n(long i0, long ni, SWIGTYPE_p_float recons) {
swigfaissJNI.Index_reconstruct_n(swigCPtr, this, i0, ni, SWIGTYPE_p_float.getCPtr(recons));
}
public void search_and_reconstruct(long n, SWIGTYPE_p_float x, long k, SWIGTYPE_p_float distances, LongVector labels, SWIGTYPE_p_float recons) {
swigfaissJNI.Index_search_and_reconstruct(swigCPtr, this, n, SWIGTYPE_p_float.getCPtr(x), k, SWIGTYPE_p_float.getCPtr(distances), SWIGTYPE_p_long_long.getCPtr(labels.data()), labels, SWIGTYPE_p_float.getCPtr(recons));
}
public void compute_residual(SWIGTYPE_p_float x, SWIGTYPE_p_float residual, long key) {
swigfaissJNI.Index_compute_residual(swigCPtr, this, SWIGTYPE_p_float.getCPtr(x), SWIGTYPE_p_float.getCPtr(residual), key);
}
public void compute_residual_n(long n, SWIGTYPE_p_float xs, SWIGTYPE_p_float residuals, LongVector keys) {
swigfaissJNI.Index_compute_residual_n(swigCPtr, this, n, SWIGTYPE_p_float.getCPtr(xs), SWIGTYPE_p_float.getCPtr(residuals), SWIGTYPE_p_long_long.getCPtr(keys.data()), keys);
}
public DistanceComputer get_distance_computer() {
long cPtr = swigfaissJNI.Index_get_distance_computer(swigCPtr, this);
return (cPtr == 0) ? null : new DistanceComputer(cPtr, false);
}
public long sa_code_size() {
return swigfaissJNI.Index_sa_code_size(swigCPtr, this);
}
public void sa_encode(long n, SWIGTYPE_p_float x, SWIGTYPE_p_unsigned_char bytes) {
swigfaissJNI.Index_sa_encode(swigCPtr, this, n, SWIGTYPE_p_float.getCPtr(x), SWIGTYPE_p_unsigned_char.getCPtr(bytes));
}
public void sa_decode(long n, SWIGTYPE_p_unsigned_char bytes, SWIGTYPE_p_float x) {
swigfaissJNI.Index_sa_decode(swigCPtr, this, n, SWIGTYPE_p_unsigned_char.getCPtr(bytes), SWIGTYPE_p_float.getCPtr(x));
}
public IndexIVF toIVF() {
long cPtr = swigfaissJNI.Index_toIVF(swigCPtr, this);
return (cPtr == 0) ? null : new IndexIVF(cPtr, false);
}
}

View File

@ -1,114 +0,0 @@
/* ----------------------------------------------------------------------------
* This file was automatically generated by SWIG (http://www.swig.org).
* Version 4.0.2
*
* Do not make changes to this file unless you know what you are doing--modify
* the SWIG interface file instead.
* ----------------------------------------------------------------------------- */
package com.twitter.ann.faiss;
public class Index2Layer extends IndexFlatCodes {
private transient long swigCPtr;
protected Index2Layer(long cPtr, boolean cMemoryOwn) {
super(swigfaissJNI.Index2Layer_SWIGUpcast(cPtr), cMemoryOwn);
swigCPtr = cPtr;
}
protected static long getCPtr(Index2Layer obj) {
return (obj == null) ? 0 : obj.swigCPtr;
}
@SuppressWarnings("deprecation")
protected void finalize() {
delete();
}
public synchronized void delete() {
if (swigCPtr != 0) {
if (swigCMemOwn) {
swigCMemOwn = false;
swigfaissJNI.delete_Index2Layer(swigCPtr);
}
swigCPtr = 0;
}
super.delete();
}
public void setQ1(Level1Quantizer value) {
swigfaissJNI.Index2Layer_q1_set(swigCPtr, this, Level1Quantizer.getCPtr(value), value);
}
public Level1Quantizer getQ1() {
long cPtr = swigfaissJNI.Index2Layer_q1_get(swigCPtr, this);
return (cPtr == 0) ? null : new Level1Quantizer(cPtr, false);
}
public void setPq(ProductQuantizer value) {
swigfaissJNI.Index2Layer_pq_set(swigCPtr, this, ProductQuantizer.getCPtr(value), value);
}
public ProductQuantizer getPq() {
long cPtr = swigfaissJNI.Index2Layer_pq_get(swigCPtr, this);
return (cPtr == 0) ? null : new ProductQuantizer(cPtr, false);
}
public void setCode_size_1(long value) {
swigfaissJNI.Index2Layer_code_size_1_set(swigCPtr, this, value);
}
public long getCode_size_1() {
return swigfaissJNI.Index2Layer_code_size_1_get(swigCPtr, this);
}
public void setCode_size_2(long value) {
swigfaissJNI.Index2Layer_code_size_2_set(swigCPtr, this, value);
}
public long getCode_size_2() {
return swigfaissJNI.Index2Layer_code_size_2_get(swigCPtr, this);
}
public Index2Layer(Index quantizer, long nlist, int M, int nbit, MetricType metric) {
this(swigfaissJNI.new_Index2Layer__SWIG_0(Index.getCPtr(quantizer), quantizer, nlist, M, nbit, metric.swigValue()), true);
}
public Index2Layer(Index quantizer, long nlist, int M, int nbit) {
this(swigfaissJNI.new_Index2Layer__SWIG_1(Index.getCPtr(quantizer), quantizer, nlist, M, nbit), true);
}
public Index2Layer(Index quantizer, long nlist, int M) {
this(swigfaissJNI.new_Index2Layer__SWIG_2(Index.getCPtr(quantizer), quantizer, nlist, M), true);
}
public Index2Layer() {
this(swigfaissJNI.new_Index2Layer__SWIG_3(), true);
}
public void train(long n, SWIGTYPE_p_float x) {
swigfaissJNI.Index2Layer_train(swigCPtr, this, n, SWIGTYPE_p_float.getCPtr(x));
}
public void search(long n, SWIGTYPE_p_float x, long k, SWIGTYPE_p_float distances, LongVector labels) {
swigfaissJNI.Index2Layer_search(swigCPtr, this, n, SWIGTYPE_p_float.getCPtr(x), k, SWIGTYPE_p_float.getCPtr(distances), SWIGTYPE_p_long_long.getCPtr(labels.data()), labels);
}
public DistanceComputer get_distance_computer() {
long cPtr = swigfaissJNI.Index2Layer_get_distance_computer(swigCPtr, this);
return (cPtr == 0) ? null : new DistanceComputer(cPtr, false);
}
public void transfer_to_IVFPQ(IndexIVFPQ other) {
swigfaissJNI.Index2Layer_transfer_to_IVFPQ(swigCPtr, this, IndexIVFPQ.getCPtr(other), other);
}
public void sa_encode(long n, SWIGTYPE_p_float x, SWIGTYPE_p_unsigned_char bytes) {
swigfaissJNI.Index2Layer_sa_encode(swigCPtr, this, n, SWIGTYPE_p_float.getCPtr(x), SWIGTYPE_p_unsigned_char.getCPtr(bytes));
}
public void sa_decode(long n, SWIGTYPE_p_unsigned_char bytes, SWIGTYPE_p_float x) {
swigfaissJNI.Index2Layer_sa_decode(swigCPtr, this, n, SWIGTYPE_p_unsigned_char.getCPtr(bytes), SWIGTYPE_p_float.getCPtr(x));
}
}

View File

@ -1,139 +0,0 @@
/* ----------------------------------------------------------------------------
* This file was automatically generated by SWIG (http://www.swig.org).
* Version 4.0.2
*
* Do not make changes to this file unless you know what you are doing--modify
* the SWIG interface file instead.
* ----------------------------------------------------------------------------- */
package com.twitter.ann.faiss;
public class IndexBinary {
private transient long swigCPtr;
protected transient boolean swigCMemOwn;
protected IndexBinary(long cPtr, boolean cMemoryOwn) {
swigCMemOwn = cMemoryOwn;
swigCPtr = cPtr;
}
protected static long getCPtr(IndexBinary obj) {
return (obj == null) ? 0 : obj.swigCPtr;
}
@SuppressWarnings("deprecation")
protected void finalize() {
delete();
}
public synchronized void delete() {
if (swigCPtr != 0) {
if (swigCMemOwn) {
swigCMemOwn = false;
swigfaissJNI.delete_IndexBinary(swigCPtr);
}
swigCPtr = 0;
}
}
public void setD(int value) {
swigfaissJNI.IndexBinary_d_set(swigCPtr, this, value);
}
public int getD() {
return swigfaissJNI.IndexBinary_d_get(swigCPtr, this);
}
public void setCode_size(int value) {
swigfaissJNI.IndexBinary_code_size_set(swigCPtr, this, value);
}
public int getCode_size() {
return swigfaissJNI.IndexBinary_code_size_get(swigCPtr, this);
}
public void setNtotal(long value) {
swigfaissJNI.IndexBinary_ntotal_set(swigCPtr, this, value);
}
public long getNtotal() {
return swigfaissJNI.IndexBinary_ntotal_get(swigCPtr, this);
}
public void setVerbose(boolean value) {
swigfaissJNI.IndexBinary_verbose_set(swigCPtr, this, value);
}
public boolean getVerbose() {
return swigfaissJNI.IndexBinary_verbose_get(swigCPtr, this);
}
public void setIs_trained(boolean value) {
swigfaissJNI.IndexBinary_is_trained_set(swigCPtr, this, value);
}
public boolean getIs_trained() {
return swigfaissJNI.IndexBinary_is_trained_get(swigCPtr, this);
}
public void setMetric_type(MetricType value) {
swigfaissJNI.IndexBinary_metric_type_set(swigCPtr, this, value.swigValue());
}
public MetricType getMetric_type() {
return MetricType.swigToEnum(swigfaissJNI.IndexBinary_metric_type_get(swigCPtr, this));
}
public void train(long n, SWIGTYPE_p_unsigned_char x) {
swigfaissJNI.IndexBinary_train(swigCPtr, this, n, SWIGTYPE_p_unsigned_char.getCPtr(x));
}
public void add(long n, SWIGTYPE_p_unsigned_char x) {
swigfaissJNI.IndexBinary_add(swigCPtr, this, n, SWIGTYPE_p_unsigned_char.getCPtr(x));
}
public void add_with_ids(long n, SWIGTYPE_p_unsigned_char x, LongVector xids) {
swigfaissJNI.IndexBinary_add_with_ids(swigCPtr, this, n, SWIGTYPE_p_unsigned_char.getCPtr(x), SWIGTYPE_p_long_long.getCPtr(xids.data()), xids);
}
public void search(long n, SWIGTYPE_p_unsigned_char x, long k, SWIGTYPE_p_int distances, LongVector labels) {
swigfaissJNI.IndexBinary_search(swigCPtr, this, n, SWIGTYPE_p_unsigned_char.getCPtr(x), k, SWIGTYPE_p_int.getCPtr(distances), SWIGTYPE_p_long_long.getCPtr(labels.data()), labels);
}
public void range_search(long n, SWIGTYPE_p_unsigned_char x, int radius, RangeSearchResult result) {
swigfaissJNI.IndexBinary_range_search(swigCPtr, this, n, SWIGTYPE_p_unsigned_char.getCPtr(x), radius, RangeSearchResult.getCPtr(result), result);
}
public void assign(long n, SWIGTYPE_p_unsigned_char x, LongVector labels, long k) {
swigfaissJNI.IndexBinary_assign__SWIG_0(swigCPtr, this, n, SWIGTYPE_p_unsigned_char.getCPtr(x), SWIGTYPE_p_long_long.getCPtr(labels.data()), labels, k);
}
public void assign(long n, SWIGTYPE_p_unsigned_char x, LongVector labels) {
swigfaissJNI.IndexBinary_assign__SWIG_1(swigCPtr, this, n, SWIGTYPE_p_unsigned_char.getCPtr(x), SWIGTYPE_p_long_long.getCPtr(labels.data()), labels);
}
public void reset() {
swigfaissJNI.IndexBinary_reset(swigCPtr, this);
}
public long remove_ids(IDSelector sel) {
return swigfaissJNI.IndexBinary_remove_ids(swigCPtr, this, IDSelector.getCPtr(sel), sel);
}
public void reconstruct(long key, SWIGTYPE_p_unsigned_char recons) {
swigfaissJNI.IndexBinary_reconstruct(swigCPtr, this, key, SWIGTYPE_p_unsigned_char.getCPtr(recons));
}
public void reconstruct_n(long i0, long ni, SWIGTYPE_p_unsigned_char recons) {
swigfaissJNI.IndexBinary_reconstruct_n(swigCPtr, this, i0, ni, SWIGTYPE_p_unsigned_char.getCPtr(recons));
}
public void search_and_reconstruct(long n, SWIGTYPE_p_unsigned_char x, long k, SWIGTYPE_p_int distances, LongVector labels, SWIGTYPE_p_unsigned_char recons) {
swigfaissJNI.IndexBinary_search_and_reconstruct(swigCPtr, this, n, SWIGTYPE_p_unsigned_char.getCPtr(x), k, SWIGTYPE_p_int.getCPtr(distances), SWIGTYPE_p_long_long.getCPtr(labels.data()), labels, SWIGTYPE_p_unsigned_char.getCPtr(recons));
}
public void display() {
swigfaissJNI.IndexBinary_display(swigCPtr, this);
}
}

View File

@ -1,96 +0,0 @@
/* ----------------------------------------------------------------------------
* This file was automatically generated by SWIG (http://www.swig.org).
* Version 4.0.2
*
* Do not make changes to this file unless you know what you are doing--modify
* the SWIG interface file instead.
* ----------------------------------------------------------------------------- */
package com.twitter.ann.faiss;
public class IndexBinaryFlat extends IndexBinary {
private transient long swigCPtr;
protected IndexBinaryFlat(long cPtr, boolean cMemoryOwn) {
super(swigfaissJNI.IndexBinaryFlat_SWIGUpcast(cPtr), cMemoryOwn);
swigCPtr = cPtr;
}
protected static long getCPtr(IndexBinaryFlat obj) {
return (obj == null) ? 0 : obj.swigCPtr;
}
@SuppressWarnings("deprecation")
protected void finalize() {
delete();
}
public synchronized void delete() {
if (swigCPtr != 0) {
if (swigCMemOwn) {
swigCMemOwn = false;
swigfaissJNI.delete_IndexBinaryFlat(swigCPtr);
}
swigCPtr = 0;
}
super.delete();
}
public void setXb(ByteVector value) {
swigfaissJNI.IndexBinaryFlat_xb_set(swigCPtr, this, ByteVector.getCPtr(value), value);
}
public ByteVector getXb() {
long cPtr = swigfaissJNI.IndexBinaryFlat_xb_get(swigCPtr, this);
return (cPtr == 0) ? null : new ByteVector(cPtr, false);
}
public void setUse_heap(boolean value) {
swigfaissJNI.IndexBinaryFlat_use_heap_set(swigCPtr, this, value);
}
public boolean getUse_heap() {
return swigfaissJNI.IndexBinaryFlat_use_heap_get(swigCPtr, this);
}
public void setQuery_batch_size(long value) {
swigfaissJNI.IndexBinaryFlat_query_batch_size_set(swigCPtr, this, value);
}
public long getQuery_batch_size() {
return swigfaissJNI.IndexBinaryFlat_query_batch_size_get(swigCPtr, this);
}
public IndexBinaryFlat(long d) {
this(swigfaissJNI.new_IndexBinaryFlat__SWIG_0(d), true);
}
public void add(long n, SWIGTYPE_p_unsigned_char x) {
swigfaissJNI.IndexBinaryFlat_add(swigCPtr, this, n, SWIGTYPE_p_unsigned_char.getCPtr(x));
}
public void reset() {
swigfaissJNI.IndexBinaryFlat_reset(swigCPtr, this);
}
public void search(long n, SWIGTYPE_p_unsigned_char x, long k, SWIGTYPE_p_int distances, LongVector labels) {
swigfaissJNI.IndexBinaryFlat_search(swigCPtr, this, n, SWIGTYPE_p_unsigned_char.getCPtr(x), k, SWIGTYPE_p_int.getCPtr(distances), SWIGTYPE_p_long_long.getCPtr(labels.data()), labels);
}
public void range_search(long n, SWIGTYPE_p_unsigned_char x, int radius, RangeSearchResult result) {
swigfaissJNI.IndexBinaryFlat_range_search(swigCPtr, this, n, SWIGTYPE_p_unsigned_char.getCPtr(x), radius, RangeSearchResult.getCPtr(result), result);
}
public void reconstruct(long key, SWIGTYPE_p_unsigned_char recons) {
swigfaissJNI.IndexBinaryFlat_reconstruct(swigCPtr, this, key, SWIGTYPE_p_unsigned_char.getCPtr(recons));
}
public long remove_ids(IDSelector sel) {
return swigfaissJNI.IndexBinaryFlat_remove_ids(swigCPtr, this, IDSelector.getCPtr(sel), sel);
}
public IndexBinaryFlat() {
this(swigfaissJNI.new_IndexBinaryFlat__SWIG_1(), true);
}
}

View File

@ -1,80 +0,0 @@
/* ----------------------------------------------------------------------------
* This file was automatically generated by SWIG (http://www.swig.org).
* Version 4.0.2
*
* Do not make changes to this file unless you know what you are doing--modify
* the SWIG interface file instead.
* ----------------------------------------------------------------------------- */
package com.twitter.ann.faiss;
public class IndexBinaryFromFloat extends IndexBinary {
private transient long swigCPtr;
protected IndexBinaryFromFloat(long cPtr, boolean cMemoryOwn) {
super(swigfaissJNI.IndexBinaryFromFloat_SWIGUpcast(cPtr), cMemoryOwn);
swigCPtr = cPtr;
}
protected static long getCPtr(IndexBinaryFromFloat obj) {
return (obj == null) ? 0 : obj.swigCPtr;
}
@SuppressWarnings("deprecation")
protected void finalize() {
delete();
}
public synchronized void delete() {
if (swigCPtr != 0) {
if (swigCMemOwn) {
swigCMemOwn = false;
swigfaissJNI.delete_IndexBinaryFromFloat(swigCPtr);
}
swigCPtr = 0;
}
super.delete();
}
public void setIndex(Index value) {
swigfaissJNI.IndexBinaryFromFloat_index_set(swigCPtr, this, Index.getCPtr(value), value);
}
public Index getIndex() {
long cPtr = swigfaissJNI.IndexBinaryFromFloat_index_get(swigCPtr, this);
return (cPtr == 0) ? null : new Index(cPtr, false);
}
public void setOwn_fields(boolean value) {
swigfaissJNI.IndexBinaryFromFloat_own_fields_set(swigCPtr, this, value);
}
public boolean getOwn_fields() {
return swigfaissJNI.IndexBinaryFromFloat_own_fields_get(swigCPtr, this);
}
public IndexBinaryFromFloat() {
this(swigfaissJNI.new_IndexBinaryFromFloat__SWIG_0(), true);
}
public IndexBinaryFromFloat(Index index) {
this(swigfaissJNI.new_IndexBinaryFromFloat__SWIG_1(Index.getCPtr(index), index), true);
}
public void add(long n, SWIGTYPE_p_unsigned_char x) {
swigfaissJNI.IndexBinaryFromFloat_add(swigCPtr, this, n, SWIGTYPE_p_unsigned_char.getCPtr(x));
}
public void reset() {
swigfaissJNI.IndexBinaryFromFloat_reset(swigCPtr, this);
}
public void search(long n, SWIGTYPE_p_unsigned_char x, long k, SWIGTYPE_p_int distances, LongVector labels) {
swigfaissJNI.IndexBinaryFromFloat_search(swigCPtr, this, n, SWIGTYPE_p_unsigned_char.getCPtr(x), k, SWIGTYPE_p_int.getCPtr(distances), SWIGTYPE_p_long_long.getCPtr(labels.data()), labels);
}
public void train(long n, SWIGTYPE_p_unsigned_char x) {
swigfaissJNI.IndexBinaryFromFloat_train(swigCPtr, this, n, SWIGTYPE_p_unsigned_char.getCPtr(x));
}
}

View File

@ -1,110 +0,0 @@
/* ----------------------------------------------------------------------------
* This file was automatically generated by SWIG (http://www.swig.org).
* Version 4.0.2
*
* Do not make changes to this file unless you know what you are doing--modify
* the SWIG interface file instead.
* ----------------------------------------------------------------------------- */
package com.twitter.ann.faiss;
public class IndexBinaryHNSW extends IndexBinary {
private transient long swigCPtr;
protected IndexBinaryHNSW(long cPtr, boolean cMemoryOwn) {
super(swigfaissJNI.IndexBinaryHNSW_SWIGUpcast(cPtr), cMemoryOwn);
swigCPtr = cPtr;
}
protected static long getCPtr(IndexBinaryHNSW obj) {
return (obj == null) ? 0 : obj.swigCPtr;
}
@SuppressWarnings("deprecation")
protected void finalize() {
delete();
}
public synchronized void delete() {
if (swigCPtr != 0) {
if (swigCMemOwn) {
swigCMemOwn = false;
swigfaissJNI.delete_IndexBinaryHNSW(swigCPtr);
}
swigCPtr = 0;
}
super.delete();
}
public void setHnsw(HNSW value) {
swigfaissJNI.IndexBinaryHNSW_hnsw_set(swigCPtr, this, HNSW.getCPtr(value), value);
}
public HNSW getHnsw() {
long cPtr = swigfaissJNI.IndexBinaryHNSW_hnsw_get(swigCPtr, this);
return (cPtr == 0) ? null : new HNSW(cPtr, false);
}
public void setOwn_fields(boolean value) {
swigfaissJNI.IndexBinaryHNSW_own_fields_set(swigCPtr, this, value);
}
public boolean getOwn_fields() {
return swigfaissJNI.IndexBinaryHNSW_own_fields_get(swigCPtr, this);
}
public void setStorage(IndexBinary value) {
swigfaissJNI.IndexBinaryHNSW_storage_set(swigCPtr, this, IndexBinary.getCPtr(value), value);
}
public IndexBinary getStorage() {
long cPtr = swigfaissJNI.IndexBinaryHNSW_storage_get(swigCPtr, this);
return (cPtr == 0) ? null : new IndexBinary(cPtr, false);
}
public IndexBinaryHNSW() {
this(swigfaissJNI.new_IndexBinaryHNSW__SWIG_0(), true);
}
public IndexBinaryHNSW(int d, int M) {
this(swigfaissJNI.new_IndexBinaryHNSW__SWIG_1(d, M), true);
}
public IndexBinaryHNSW(int d) {
this(swigfaissJNI.new_IndexBinaryHNSW__SWIG_2(d), true);
}
public IndexBinaryHNSW(IndexBinary storage, int M) {
this(swigfaissJNI.new_IndexBinaryHNSW__SWIG_3(IndexBinary.getCPtr(storage), storage, M), true);
}
public IndexBinaryHNSW(IndexBinary storage) {
this(swigfaissJNI.new_IndexBinaryHNSW__SWIG_4(IndexBinary.getCPtr(storage), storage), true);
}
public DistanceComputer get_distance_computer() {
long cPtr = swigfaissJNI.IndexBinaryHNSW_get_distance_computer(swigCPtr, this);
return (cPtr == 0) ? null : new DistanceComputer(cPtr, false);
}
public void add(long n, SWIGTYPE_p_unsigned_char x) {
swigfaissJNI.IndexBinaryHNSW_add(swigCPtr, this, n, SWIGTYPE_p_unsigned_char.getCPtr(x));
}
public void train(long n, SWIGTYPE_p_unsigned_char x) {
swigfaissJNI.IndexBinaryHNSW_train(swigCPtr, this, n, SWIGTYPE_p_unsigned_char.getCPtr(x));
}
public void search(long n, SWIGTYPE_p_unsigned_char x, long k, SWIGTYPE_p_int distances, LongVector labels) {
swigfaissJNI.IndexBinaryHNSW_search(swigCPtr, this, n, SWIGTYPE_p_unsigned_char.getCPtr(x), k, SWIGTYPE_p_int.getCPtr(distances), SWIGTYPE_p_long_long.getCPtr(labels.data()), labels);
}
public void reconstruct(long key, SWIGTYPE_p_unsigned_char recons) {
swigfaissJNI.IndexBinaryHNSW_reconstruct(swigCPtr, this, key, SWIGTYPE_p_unsigned_char.getCPtr(recons));
}
public void reset() {
swigfaissJNI.IndexBinaryHNSW_reset(swigCPtr, this);
}
}

View File

@ -1,237 +0,0 @@
/* ----------------------------------------------------------------------------
* This file was automatically generated by SWIG (http://www.swig.org).
* Version 4.0.2
*
* Do not make changes to this file unless you know what you are doing--modify
* the SWIG interface file instead.
* ----------------------------------------------------------------------------- */
package com.twitter.ann.faiss;
public class IndexBinaryIVF extends IndexBinary {
private transient long swigCPtr;
protected IndexBinaryIVF(long cPtr, boolean cMemoryOwn) {
super(swigfaissJNI.IndexBinaryIVF_SWIGUpcast(cPtr), cMemoryOwn);
swigCPtr = cPtr;
}
protected static long getCPtr(IndexBinaryIVF obj) {
return (obj == null) ? 0 : obj.swigCPtr;
}
@SuppressWarnings("deprecation")
protected void finalize() {
delete();
}
public synchronized void delete() {
if (swigCPtr != 0) {
if (swigCMemOwn) {
swigCMemOwn = false;
swigfaissJNI.delete_IndexBinaryIVF(swigCPtr);
}
swigCPtr = 0;
}
super.delete();
}
public void setInvlists(InvertedLists value) {
swigfaissJNI.IndexBinaryIVF_invlists_set(swigCPtr, this, InvertedLists.getCPtr(value), value);
}
public InvertedLists getInvlists() {
long cPtr = swigfaissJNI.IndexBinaryIVF_invlists_get(swigCPtr, this);
return (cPtr == 0) ? null : new InvertedLists(cPtr, false);
}
public void setOwn_invlists(boolean value) {
swigfaissJNI.IndexBinaryIVF_own_invlists_set(swigCPtr, this, value);
}
public boolean getOwn_invlists() {
return swigfaissJNI.IndexBinaryIVF_own_invlists_get(swigCPtr, this);
}
public void setNprobe(long value) {
swigfaissJNI.IndexBinaryIVF_nprobe_set(swigCPtr, this, value);
}
public long getNprobe() {
return swigfaissJNI.IndexBinaryIVF_nprobe_get(swigCPtr, this);
}
public void setMax_codes(long value) {
swigfaissJNI.IndexBinaryIVF_max_codes_set(swigCPtr, this, value);
}
public long getMax_codes() {
return swigfaissJNI.IndexBinaryIVF_max_codes_get(swigCPtr, this);
}
public void setUse_heap(boolean value) {
swigfaissJNI.IndexBinaryIVF_use_heap_set(swigCPtr, this, value);
}
public boolean getUse_heap() {
return swigfaissJNI.IndexBinaryIVF_use_heap_get(swigCPtr, this);
}
public void setDirect_map(SWIGTYPE_p_DirectMap value) {
swigfaissJNI.IndexBinaryIVF_direct_map_set(swigCPtr, this, SWIGTYPE_p_DirectMap.getCPtr(value));
}
public SWIGTYPE_p_DirectMap getDirect_map() {
return new SWIGTYPE_p_DirectMap(swigfaissJNI.IndexBinaryIVF_direct_map_get(swigCPtr, this), true);
}
public void setQuantizer(IndexBinary value) {
swigfaissJNI.IndexBinaryIVF_quantizer_set(swigCPtr, this, IndexBinary.getCPtr(value), value);
}
public IndexBinary getQuantizer() {
long cPtr = swigfaissJNI.IndexBinaryIVF_quantizer_get(swigCPtr, this);
return (cPtr == 0) ? null : new IndexBinary(cPtr, false);
}
public void setNlist(long value) {
swigfaissJNI.IndexBinaryIVF_nlist_set(swigCPtr, this, value);
}
public long getNlist() {
return swigfaissJNI.IndexBinaryIVF_nlist_get(swigCPtr, this);
}
public void setOwn_fields(boolean value) {
swigfaissJNI.IndexBinaryIVF_own_fields_set(swigCPtr, this, value);
}
public boolean getOwn_fields() {
return swigfaissJNI.IndexBinaryIVF_own_fields_get(swigCPtr, this);
}
public void setCp(ClusteringParameters value) {
swigfaissJNI.IndexBinaryIVF_cp_set(swigCPtr, this, ClusteringParameters.getCPtr(value), value);
}
public ClusteringParameters getCp() {
long cPtr = swigfaissJNI.IndexBinaryIVF_cp_get(swigCPtr, this);
return (cPtr == 0) ? null : new ClusteringParameters(cPtr, false);
}
public void setClustering_index(Index value) {
swigfaissJNI.IndexBinaryIVF_clustering_index_set(swigCPtr, this, Index.getCPtr(value), value);
}
public Index getClustering_index() {
long cPtr = swigfaissJNI.IndexBinaryIVF_clustering_index_get(swigCPtr, this);
return (cPtr == 0) ? null : new Index(cPtr, false);
}
public IndexBinaryIVF(IndexBinary quantizer, long d, long nlist) {
this(swigfaissJNI.new_IndexBinaryIVF__SWIG_0(IndexBinary.getCPtr(quantizer), quantizer, d, nlist), true);
}
public IndexBinaryIVF() {
this(swigfaissJNI.new_IndexBinaryIVF__SWIG_1(), true);
}
public void reset() {
swigfaissJNI.IndexBinaryIVF_reset(swigCPtr, this);
}
public void train(long n, SWIGTYPE_p_unsigned_char x) {
swigfaissJNI.IndexBinaryIVF_train(swigCPtr, this, n, SWIGTYPE_p_unsigned_char.getCPtr(x));
}
public void add(long n, SWIGTYPE_p_unsigned_char x) {
swigfaissJNI.IndexBinaryIVF_add(swigCPtr, this, n, SWIGTYPE_p_unsigned_char.getCPtr(x));
}
public void add_with_ids(long n, SWIGTYPE_p_unsigned_char x, LongVector xids) {
swigfaissJNI.IndexBinaryIVF_add_with_ids(swigCPtr, this, n, SWIGTYPE_p_unsigned_char.getCPtr(x), SWIGTYPE_p_long_long.getCPtr(xids.data()), xids);
}
public void add_core(long n, SWIGTYPE_p_unsigned_char x, LongVector xids, LongVector precomputed_idx) {
swigfaissJNI.IndexBinaryIVF_add_core(swigCPtr, this, n, SWIGTYPE_p_unsigned_char.getCPtr(x), SWIGTYPE_p_long_long.getCPtr(xids.data()), xids, SWIGTYPE_p_long_long.getCPtr(precomputed_idx.data()), precomputed_idx);
}
public void search_preassigned(long n, SWIGTYPE_p_unsigned_char x, long k, LongVector assign, SWIGTYPE_p_int centroid_dis, SWIGTYPE_p_int distances, LongVector labels, boolean store_pairs, IVFSearchParameters params) {
swigfaissJNI.IndexBinaryIVF_search_preassigned__SWIG_0(swigCPtr, this, n, SWIGTYPE_p_unsigned_char.getCPtr(x), k, SWIGTYPE_p_long_long.getCPtr(assign.data()), assign, SWIGTYPE_p_int.getCPtr(centroid_dis), SWIGTYPE_p_int.getCPtr(distances), SWIGTYPE_p_long_long.getCPtr(labels.data()), labels, store_pairs, IVFSearchParameters.getCPtr(params), params);
}
public void search_preassigned(long n, SWIGTYPE_p_unsigned_char x, long k, LongVector assign, SWIGTYPE_p_int centroid_dis, SWIGTYPE_p_int distances, LongVector labels, boolean store_pairs) {
swigfaissJNI.IndexBinaryIVF_search_preassigned__SWIG_1(swigCPtr, this, n, SWIGTYPE_p_unsigned_char.getCPtr(x), k, SWIGTYPE_p_long_long.getCPtr(assign.data()), assign, SWIGTYPE_p_int.getCPtr(centroid_dis), SWIGTYPE_p_int.getCPtr(distances), SWIGTYPE_p_long_long.getCPtr(labels.data()), labels, store_pairs);
}
public SWIGTYPE_p_faiss__BinaryInvertedListScanner get_InvertedListScanner(boolean store_pairs) {
long cPtr = swigfaissJNI.IndexBinaryIVF_get_InvertedListScanner__SWIG_0(swigCPtr, this, store_pairs);
return (cPtr == 0) ? null : new SWIGTYPE_p_faiss__BinaryInvertedListScanner(cPtr, false);
}
public SWIGTYPE_p_faiss__BinaryInvertedListScanner get_InvertedListScanner() {
long cPtr = swigfaissJNI.IndexBinaryIVF_get_InvertedListScanner__SWIG_1(swigCPtr, this);
return (cPtr == 0) ? null : new SWIGTYPE_p_faiss__BinaryInvertedListScanner(cPtr, false);
}
public void search(long n, SWIGTYPE_p_unsigned_char x, long k, SWIGTYPE_p_int distances, LongVector labels) {
swigfaissJNI.IndexBinaryIVF_search(swigCPtr, this, n, SWIGTYPE_p_unsigned_char.getCPtr(x), k, SWIGTYPE_p_int.getCPtr(distances), SWIGTYPE_p_long_long.getCPtr(labels.data()), labels);
}
public void range_search(long n, SWIGTYPE_p_unsigned_char x, int radius, RangeSearchResult result) {
swigfaissJNI.IndexBinaryIVF_range_search(swigCPtr, this, n, SWIGTYPE_p_unsigned_char.getCPtr(x), radius, RangeSearchResult.getCPtr(result), result);
}
public void range_search_preassigned(long n, SWIGTYPE_p_unsigned_char x, int radius, LongVector assign, SWIGTYPE_p_int centroid_dis, RangeSearchResult result) {
swigfaissJNI.IndexBinaryIVF_range_search_preassigned(swigCPtr, this, n, SWIGTYPE_p_unsigned_char.getCPtr(x), radius, SWIGTYPE_p_long_long.getCPtr(assign.data()), assign, SWIGTYPE_p_int.getCPtr(centroid_dis), RangeSearchResult.getCPtr(result), result);
}
public void reconstruct(long key, SWIGTYPE_p_unsigned_char recons) {
swigfaissJNI.IndexBinaryIVF_reconstruct(swigCPtr, this, key, SWIGTYPE_p_unsigned_char.getCPtr(recons));
}
public void reconstruct_n(long i0, long ni, SWIGTYPE_p_unsigned_char recons) {
swigfaissJNI.IndexBinaryIVF_reconstruct_n(swigCPtr, this, i0, ni, SWIGTYPE_p_unsigned_char.getCPtr(recons));
}
public void search_and_reconstruct(long n, SWIGTYPE_p_unsigned_char x, long k, SWIGTYPE_p_int distances, LongVector labels, SWIGTYPE_p_unsigned_char recons) {
swigfaissJNI.IndexBinaryIVF_search_and_reconstruct(swigCPtr, this, n, SWIGTYPE_p_unsigned_char.getCPtr(x), k, SWIGTYPE_p_int.getCPtr(distances), SWIGTYPE_p_long_long.getCPtr(labels.data()), labels, SWIGTYPE_p_unsigned_char.getCPtr(recons));
}
public void reconstruct_from_offset(long list_no, long offset, SWIGTYPE_p_unsigned_char recons) {
swigfaissJNI.IndexBinaryIVF_reconstruct_from_offset(swigCPtr, this, list_no, offset, SWIGTYPE_p_unsigned_char.getCPtr(recons));
}
public long remove_ids(IDSelector sel) {
return swigfaissJNI.IndexBinaryIVF_remove_ids(swigCPtr, this, IDSelector.getCPtr(sel), sel);
}
public void merge_from(IndexBinaryIVF other, long add_id) {
swigfaissJNI.IndexBinaryIVF_merge_from(swigCPtr, this, IndexBinaryIVF.getCPtr(other), other, add_id);
}
public long get_list_size(long list_no) {
return swigfaissJNI.IndexBinaryIVF_get_list_size(swigCPtr, this, list_no);
}
public void make_direct_map(boolean new_maintain_direct_map) {
swigfaissJNI.IndexBinaryIVF_make_direct_map__SWIG_0(swigCPtr, this, new_maintain_direct_map);
}
public void make_direct_map() {
swigfaissJNI.IndexBinaryIVF_make_direct_map__SWIG_1(swigCPtr, this);
}
public void set_direct_map_type(SWIGTYPE_p_DirectMap__Type type) {
swigfaissJNI.IndexBinaryIVF_set_direct_map_type(swigCPtr, this, SWIGTYPE_p_DirectMap__Type.getCPtr(type));
}
public void replace_invlists(InvertedLists il, boolean own) {
swigfaissJNI.IndexBinaryIVF_replace_invlists__SWIG_0(swigCPtr, this, InvertedLists.getCPtr(il), il, own);
}
public void replace_invlists(InvertedLists il) {
swigfaissJNI.IndexBinaryIVF_replace_invlists__SWIG_1(swigCPtr, this, InvertedLists.getCPtr(il), il);
}
}

View File

@ -1,85 +0,0 @@
/* ----------------------------------------------------------------------------
* This file was automatically generated by SWIG (http://www.swig.org).
* Version 4.0.2
*
* Do not make changes to this file unless you know what you are doing--modify
* the SWIG interface file instead.
* ----------------------------------------------------------------------------- */
package com.twitter.ann.faiss;
public class IndexFlat extends IndexFlatCodes {
private transient long swigCPtr;
protected IndexFlat(long cPtr, boolean cMemoryOwn) {
super(swigfaissJNI.IndexFlat_SWIGUpcast(cPtr), cMemoryOwn);
swigCPtr = cPtr;
}
protected static long getCPtr(IndexFlat obj) {
return (obj == null) ? 0 : obj.swigCPtr;
}
@SuppressWarnings("deprecation")
protected void finalize() {
delete();
}
public synchronized void delete() {
if (swigCPtr != 0) {
if (swigCMemOwn) {
swigCMemOwn = false;
swigfaissJNI.delete_IndexFlat(swigCPtr);
}
swigCPtr = 0;
}
super.delete();
}
public IndexFlat(long d, MetricType metric) {
this(swigfaissJNI.new_IndexFlat__SWIG_0(d, metric.swigValue()), true);
}
public IndexFlat(long d) {
this(swigfaissJNI.new_IndexFlat__SWIG_1(d), true);
}
public void search(long n, SWIGTYPE_p_float x, long k, SWIGTYPE_p_float distances, LongVector labels) {
swigfaissJNI.IndexFlat_search(swigCPtr, this, n, SWIGTYPE_p_float.getCPtr(x), k, SWIGTYPE_p_float.getCPtr(distances), SWIGTYPE_p_long_long.getCPtr(labels.data()), labels);
}
public void range_search(long n, SWIGTYPE_p_float x, float radius, RangeSearchResult result) {
swigfaissJNI.IndexFlat_range_search(swigCPtr, this, n, SWIGTYPE_p_float.getCPtr(x), radius, RangeSearchResult.getCPtr(result), result);
}
public void reconstruct(long key, SWIGTYPE_p_float recons) {
swigfaissJNI.IndexFlat_reconstruct(swigCPtr, this, key, SWIGTYPE_p_float.getCPtr(recons));
}
public void compute_distance_subset(long n, SWIGTYPE_p_float x, long k, SWIGTYPE_p_float distances, LongVector labels) {
swigfaissJNI.IndexFlat_compute_distance_subset(swigCPtr, this, n, SWIGTYPE_p_float.getCPtr(x), k, SWIGTYPE_p_float.getCPtr(distances), SWIGTYPE_p_long_long.getCPtr(labels.data()), labels);
}
public SWIGTYPE_p_float get_xb() {
long cPtr = swigfaissJNI.IndexFlat_get_xb__SWIG_0(swigCPtr, this);
return (cPtr == 0) ? null : new SWIGTYPE_p_float(cPtr, false);
}
public IndexFlat() {
this(swigfaissJNI.new_IndexFlat__SWIG_2(), true);
}
public DistanceComputer get_distance_computer() {
long cPtr = swigfaissJNI.IndexFlat_get_distance_computer(swigCPtr, this);
return (cPtr == 0) ? null : new DistanceComputer(cPtr, false);
}
public void sa_encode(long n, SWIGTYPE_p_float x, SWIGTYPE_p_unsigned_char bytes) {
swigfaissJNI.IndexFlat_sa_encode(swigCPtr, this, n, SWIGTYPE_p_float.getCPtr(x), SWIGTYPE_p_unsigned_char.getCPtr(bytes));
}
public void sa_decode(long n, SWIGTYPE_p_unsigned_char bytes, SWIGTYPE_p_float x) {
swigfaissJNI.IndexFlat_sa_decode(swigCPtr, this, n, SWIGTYPE_p_unsigned_char.getCPtr(bytes), SWIGTYPE_p_float.getCPtr(x));
}
}

View File

@ -1,80 +0,0 @@
/* ----------------------------------------------------------------------------
* This file was automatically generated by SWIG (http://www.swig.org).
* Version 4.0.2
*
* Do not make changes to this file unless you know what you are doing--modify
* the SWIG interface file instead.
* ----------------------------------------------------------------------------- */
package com.twitter.ann.faiss;
public class IndexFlat1D extends IndexFlatL2 {
private transient long swigCPtr;
protected IndexFlat1D(long cPtr, boolean cMemoryOwn) {
super(swigfaissJNI.IndexFlat1D_SWIGUpcast(cPtr), cMemoryOwn);
swigCPtr = cPtr;
}
protected static long getCPtr(IndexFlat1D obj) {
return (obj == null) ? 0 : obj.swigCPtr;
}
@SuppressWarnings("deprecation")
protected void finalize() {
delete();
}
public synchronized void delete() {
if (swigCPtr != 0) {
if (swigCMemOwn) {
swigCMemOwn = false;
swigfaissJNI.delete_IndexFlat1D(swigCPtr);
}
swigCPtr = 0;
}
super.delete();
}
public void setContinuous_update(boolean value) {
swigfaissJNI.IndexFlat1D_continuous_update_set(swigCPtr, this, value);
}
public boolean getContinuous_update() {
return swigfaissJNI.IndexFlat1D_continuous_update_get(swigCPtr, this);
}
public void setPerm(SWIGTYPE_p_std__vectorT_int64_t_t value) {
swigfaissJNI.IndexFlat1D_perm_set(swigCPtr, this, SWIGTYPE_p_std__vectorT_int64_t_t.getCPtr(value));
}
public SWIGTYPE_p_std__vectorT_int64_t_t getPerm() {
long cPtr = swigfaissJNI.IndexFlat1D_perm_get(swigCPtr, this);
return (cPtr == 0) ? null : new SWIGTYPE_p_std__vectorT_int64_t_t(cPtr, false);
}
public IndexFlat1D(boolean continuous_update) {
this(swigfaissJNI.new_IndexFlat1D__SWIG_0(continuous_update), true);
}
public IndexFlat1D() {
this(swigfaissJNI.new_IndexFlat1D__SWIG_1(), true);
}
public void update_permutation() {
swigfaissJNI.IndexFlat1D_update_permutation(swigCPtr, this);
}
public void add(long n, SWIGTYPE_p_float x) {
swigfaissJNI.IndexFlat1D_add(swigCPtr, this, n, SWIGTYPE_p_float.getCPtr(x));
}
public void reset() {
swigfaissJNI.IndexFlat1D_reset(swigCPtr, this);
}
public void search(long n, SWIGTYPE_p_float x, long k, SWIGTYPE_p_float distances, LongVector labels) {
swigfaissJNI.IndexFlat1D_search(swigCPtr, this, n, SWIGTYPE_p_float.getCPtr(x), k, SWIGTYPE_p_float.getCPtr(distances), SWIGTYPE_p_long_long.getCPtr(labels.data()), labels);
}
}

View File

@ -1,80 +0,0 @@
/* ----------------------------------------------------------------------------
* This file was automatically generated by SWIG (http://www.swig.org).
* Version 4.0.2
*
* Do not make changes to this file unless you know what you are doing--modify
* the SWIG interface file instead.
* ----------------------------------------------------------------------------- */
package com.twitter.ann.faiss;
public class IndexFlatCodes extends Index {
private transient long swigCPtr;
protected IndexFlatCodes(long cPtr, boolean cMemoryOwn) {
super(swigfaissJNI.IndexFlatCodes_SWIGUpcast(cPtr), cMemoryOwn);
swigCPtr = cPtr;
}
protected static long getCPtr(IndexFlatCodes obj) {
return (obj == null) ? 0 : obj.swigCPtr;
}
@SuppressWarnings("deprecation")
protected void finalize() {
delete();
}
public synchronized void delete() {
if (swigCPtr != 0) {
if (swigCMemOwn) {
swigCMemOwn = false;
swigfaissJNI.delete_IndexFlatCodes(swigCPtr);
}
swigCPtr = 0;
}
super.delete();
}
public void setCode_size(long value) {
swigfaissJNI.IndexFlatCodes_code_size_set(swigCPtr, this, value);
}
public long getCode_size() {
return swigfaissJNI.IndexFlatCodes_code_size_get(swigCPtr, this);
}
public void setCodes(ByteVector value) {
swigfaissJNI.IndexFlatCodes_codes_set(swigCPtr, this, ByteVector.getCPtr(value), value);
}
public ByteVector getCodes() {
long cPtr = swigfaissJNI.IndexFlatCodes_codes_get(swigCPtr, this);
return (cPtr == 0) ? null : new ByteVector(cPtr, false);
}
public void add(long n, SWIGTYPE_p_float x) {
swigfaissJNI.IndexFlatCodes_add(swigCPtr, this, n, SWIGTYPE_p_float.getCPtr(x));
}
public void reset() {
swigfaissJNI.IndexFlatCodes_reset(swigCPtr, this);
}
public void reconstruct_n(long i0, long ni, SWIGTYPE_p_float recons) {
swigfaissJNI.IndexFlatCodes_reconstruct_n(swigCPtr, this, i0, ni, SWIGTYPE_p_float.getCPtr(recons));
}
public void reconstruct(long key, SWIGTYPE_p_float recons) {
swigfaissJNI.IndexFlatCodes_reconstruct(swigCPtr, this, key, SWIGTYPE_p_float.getCPtr(recons));
}
public long sa_code_size() {
return swigfaissJNI.IndexFlatCodes_sa_code_size(swigCPtr, this);
}
public long remove_ids(IDSelector sel) {
return swigfaissJNI.IndexFlatCodes_remove_ids(swigCPtr, this, IDSelector.getCPtr(sel), sel);
}
}

View File

@ -1,47 +0,0 @@
/* ----------------------------------------------------------------------------
* This file was automatically generated by SWIG (http://www.swig.org).
* Version 4.0.2
*
* Do not make changes to this file unless you know what you are doing--modify
* the SWIG interface file instead.
* ----------------------------------------------------------------------------- */
package com.twitter.ann.faiss;
public class IndexFlatIP extends IndexFlat {
private transient long swigCPtr;
protected IndexFlatIP(long cPtr, boolean cMemoryOwn) {
super(swigfaissJNI.IndexFlatIP_SWIGUpcast(cPtr), cMemoryOwn);
swigCPtr = cPtr;
}
protected static long getCPtr(IndexFlatIP obj) {
return (obj == null) ? 0 : obj.swigCPtr;
}
@SuppressWarnings("deprecation")
protected void finalize() {
delete();
}
public synchronized void delete() {
if (swigCPtr != 0) {
if (swigCMemOwn) {
swigCMemOwn = false;
swigfaissJNI.delete_IndexFlatIP(swigCPtr);
}
swigCPtr = 0;
}
super.delete();
}
public IndexFlatIP(long d) {
this(swigfaissJNI.new_IndexFlatIP__SWIG_0(d), true);
}
public IndexFlatIP() {
this(swigfaissJNI.new_IndexFlatIP__SWIG_1(), true);
}
}

View File

@ -1,47 +0,0 @@
/* ----------------------------------------------------------------------------
* This file was automatically generated by SWIG (http://www.swig.org).
* Version 4.0.2
*
* Do not make changes to this file unless you know what you are doing--modify
* the SWIG interface file instead.
* ----------------------------------------------------------------------------- */
package com.twitter.ann.faiss;
public class IndexFlatL2 extends IndexFlat {
private transient long swigCPtr;
protected IndexFlatL2(long cPtr, boolean cMemoryOwn) {
super(swigfaissJNI.IndexFlatL2_SWIGUpcast(cPtr), cMemoryOwn);
swigCPtr = cPtr;
}
protected static long getCPtr(IndexFlatL2 obj) {
return (obj == null) ? 0 : obj.swigCPtr;
}
@SuppressWarnings("deprecation")
protected void finalize() {
delete();
}
public synchronized void delete() {
if (swigCPtr != 0) {
if (swigCMemOwn) {
swigCMemOwn = false;
swigfaissJNI.delete_IndexFlatL2(swigCPtr);
}
swigCPtr = 0;
}
super.delete();
}
public IndexFlatL2(long d) {
this(swigfaissJNI.new_IndexFlatL2__SWIG_0(d), true);
}
public IndexFlatL2() {
this(swigfaissJNI.new_IndexFlatL2__SWIG_1(), true);
}
}

View File

@ -1,150 +0,0 @@
/* ----------------------------------------------------------------------------
* This file was automatically generated by SWIG (http://www.swig.org).
* Version 4.0.2
*
* Do not make changes to this file unless you know what you are doing--modify
* the SWIG interface file instead.
* ----------------------------------------------------------------------------- */
package com.twitter.ann.faiss;
public class IndexHNSW extends Index {
private transient long swigCPtr;
protected IndexHNSW(long cPtr, boolean cMemoryOwn) {
super(swigfaissJNI.IndexHNSW_SWIGUpcast(cPtr), cMemoryOwn);
swigCPtr = cPtr;
}
protected static long getCPtr(IndexHNSW obj) {
return (obj == null) ? 0 : obj.swigCPtr;
}
@SuppressWarnings("deprecation")
protected void finalize() {
delete();
}
public synchronized void delete() {
if (swigCPtr != 0) {
if (swigCMemOwn) {
swigCMemOwn = false;
swigfaissJNI.delete_IndexHNSW(swigCPtr);
}
swigCPtr = 0;
}
super.delete();
}
public void setHnsw(HNSW value) {
swigfaissJNI.IndexHNSW_hnsw_set(swigCPtr, this, HNSW.getCPtr(value), value);
}
public HNSW getHnsw() {
long cPtr = swigfaissJNI.IndexHNSW_hnsw_get(swigCPtr, this);
return (cPtr == 0) ? null : new HNSW(cPtr, false);
}
public void setOwn_fields(boolean value) {
swigfaissJNI.IndexHNSW_own_fields_set(swigCPtr, this, value);
}
public boolean getOwn_fields() {
return swigfaissJNI.IndexHNSW_own_fields_get(swigCPtr, this);
}
public void setStorage(Index value) {
swigfaissJNI.IndexHNSW_storage_set(swigCPtr, this, Index.getCPtr(value), value);
}
public Index getStorage() {
long cPtr = swigfaissJNI.IndexHNSW_storage_get(swigCPtr, this);
return (cPtr == 0) ? null : new Index(cPtr, false);
}
public void setReconstruct_from_neighbors(ReconstructFromNeighbors value) {
swigfaissJNI.IndexHNSW_reconstruct_from_neighbors_set(swigCPtr, this, ReconstructFromNeighbors.getCPtr(value), value);
}
public ReconstructFromNeighbors getReconstruct_from_neighbors() {
long cPtr = swigfaissJNI.IndexHNSW_reconstruct_from_neighbors_get(swigCPtr, this);
return (cPtr == 0) ? null : new ReconstructFromNeighbors(cPtr, false);
}
public IndexHNSW(int d, int M, MetricType metric) {
this(swigfaissJNI.new_IndexHNSW__SWIG_0(d, M, metric.swigValue()), true);
}
public IndexHNSW(int d, int M) {
this(swigfaissJNI.new_IndexHNSW__SWIG_1(d, M), true);
}
public IndexHNSW(int d) {
this(swigfaissJNI.new_IndexHNSW__SWIG_2(d), true);
}
public IndexHNSW() {
this(swigfaissJNI.new_IndexHNSW__SWIG_3(), true);
}
public IndexHNSW(Index storage, int M) {
this(swigfaissJNI.new_IndexHNSW__SWIG_4(Index.getCPtr(storage), storage, M), true);
}
public IndexHNSW(Index storage) {
this(swigfaissJNI.new_IndexHNSW__SWIG_5(Index.getCPtr(storage), storage), true);
}
public void add(long n, SWIGTYPE_p_float x) {
swigfaissJNI.IndexHNSW_add(swigCPtr, this, n, SWIGTYPE_p_float.getCPtr(x));
}
public void train(long n, SWIGTYPE_p_float x) {
swigfaissJNI.IndexHNSW_train(swigCPtr, this, n, SWIGTYPE_p_float.getCPtr(x));
}
public void search(long n, SWIGTYPE_p_float x, long k, SWIGTYPE_p_float distances, LongVector labels) {
swigfaissJNI.IndexHNSW_search(swigCPtr, this, n, SWIGTYPE_p_float.getCPtr(x), k, SWIGTYPE_p_float.getCPtr(distances), SWIGTYPE_p_long_long.getCPtr(labels.data()), labels);
}
public void reconstruct(long key, SWIGTYPE_p_float recons) {
swigfaissJNI.IndexHNSW_reconstruct(swigCPtr, this, key, SWIGTYPE_p_float.getCPtr(recons));
}
public void reset() {
swigfaissJNI.IndexHNSW_reset(swigCPtr, this);
}
public void shrink_level_0_neighbors(int size) {
swigfaissJNI.IndexHNSW_shrink_level_0_neighbors(swigCPtr, this, size);
}
public void search_level_0(long n, SWIGTYPE_p_float x, long k, SWIGTYPE_p_int nearest, SWIGTYPE_p_float nearest_d, SWIGTYPE_p_float distances, LongVector labels, int nprobe, int search_type) {
swigfaissJNI.IndexHNSW_search_level_0__SWIG_0(swigCPtr, this, n, SWIGTYPE_p_float.getCPtr(x), k, SWIGTYPE_p_int.getCPtr(nearest), SWIGTYPE_p_float.getCPtr(nearest_d), SWIGTYPE_p_float.getCPtr(distances), SWIGTYPE_p_long_long.getCPtr(labels.data()), labels, nprobe, search_type);
}
public void search_level_0(long n, SWIGTYPE_p_float x, long k, SWIGTYPE_p_int nearest, SWIGTYPE_p_float nearest_d, SWIGTYPE_p_float distances, LongVector labels, int nprobe) {
swigfaissJNI.IndexHNSW_search_level_0__SWIG_1(swigCPtr, this, n, SWIGTYPE_p_float.getCPtr(x), k, SWIGTYPE_p_int.getCPtr(nearest), SWIGTYPE_p_float.getCPtr(nearest_d), SWIGTYPE_p_float.getCPtr(distances), SWIGTYPE_p_long_long.getCPtr(labels.data()), labels, nprobe);
}
public void search_level_0(long n, SWIGTYPE_p_float x, long k, SWIGTYPE_p_int nearest, SWIGTYPE_p_float nearest_d, SWIGTYPE_p_float distances, LongVector labels) {
swigfaissJNI.IndexHNSW_search_level_0__SWIG_2(swigCPtr, this, n, SWIGTYPE_p_float.getCPtr(x), k, SWIGTYPE_p_int.getCPtr(nearest), SWIGTYPE_p_float.getCPtr(nearest_d), SWIGTYPE_p_float.getCPtr(distances), SWIGTYPE_p_long_long.getCPtr(labels.data()), labels);
}
public void init_level_0_from_knngraph(int k, SWIGTYPE_p_float D, LongVector I) {
swigfaissJNI.IndexHNSW_init_level_0_from_knngraph(swigCPtr, this, k, SWIGTYPE_p_float.getCPtr(D), SWIGTYPE_p_long_long.getCPtr(I.data()), I);
}
public void init_level_0_from_entry_points(int npt, SWIGTYPE_p_int points, SWIGTYPE_p_int nearests) {
swigfaissJNI.IndexHNSW_init_level_0_from_entry_points(swigCPtr, this, npt, SWIGTYPE_p_int.getCPtr(points), SWIGTYPE_p_int.getCPtr(nearests));
}
public void reorder_links() {
swigfaissJNI.IndexHNSW_reorder_links(swigCPtr, this);
}
public void link_singletons() {
swigfaissJNI.IndexHNSW_link_singletons(swigCPtr, this);
}
}

View File

@ -1,55 +0,0 @@
/* ----------------------------------------------------------------------------
* This file was automatically generated by SWIG (http://www.swig.org).
* Version 4.0.2
*
* Do not make changes to this file unless you know what you are doing--modify
* the SWIG interface file instead.
* ----------------------------------------------------------------------------- */
package com.twitter.ann.faiss;
public class IndexHNSW2Level extends IndexHNSW {
private transient long swigCPtr;
protected IndexHNSW2Level(long cPtr, boolean cMemoryOwn) {
super(swigfaissJNI.IndexHNSW2Level_SWIGUpcast(cPtr), cMemoryOwn);
swigCPtr = cPtr;
}
protected static long getCPtr(IndexHNSW2Level obj) {
return (obj == null) ? 0 : obj.swigCPtr;
}
@SuppressWarnings("deprecation")
protected void finalize() {
delete();
}
public synchronized void delete() {
if (swigCPtr != 0) {
if (swigCMemOwn) {
swigCMemOwn = false;
swigfaissJNI.delete_IndexHNSW2Level(swigCPtr);
}
swigCPtr = 0;
}
super.delete();
}
public IndexHNSW2Level() {
this(swigfaissJNI.new_IndexHNSW2Level__SWIG_0(), true);
}
public IndexHNSW2Level(Index quantizer, long nlist, int m_pq, int M) {
this(swigfaissJNI.new_IndexHNSW2Level__SWIG_1(Index.getCPtr(quantizer), quantizer, nlist, m_pq, M), true);
}
public void flip_to_ivf() {
swigfaissJNI.IndexHNSW2Level_flip_to_ivf(swigCPtr, this);
}
public void search(long n, SWIGTYPE_p_float x, long k, SWIGTYPE_p_float distances, LongVector labels) {
swigfaissJNI.IndexHNSW2Level_search(swigCPtr, this, n, SWIGTYPE_p_float.getCPtr(x), k, SWIGTYPE_p_float.getCPtr(distances), SWIGTYPE_p_long_long.getCPtr(labels.data()), labels);
}
}

View File

@ -1,51 +0,0 @@
/* ----------------------------------------------------------------------------
* This file was automatically generated by SWIG (http://www.swig.org).
* Version 4.0.2
*
* Do not make changes to this file unless you know what you are doing--modify
* the SWIG interface file instead.
* ----------------------------------------------------------------------------- */
package com.twitter.ann.faiss;
public class IndexHNSWFlat extends IndexHNSW {
private transient long swigCPtr;
protected IndexHNSWFlat(long cPtr, boolean cMemoryOwn) {
super(swigfaissJNI.IndexHNSWFlat_SWIGUpcast(cPtr), cMemoryOwn);
swigCPtr = cPtr;
}
protected static long getCPtr(IndexHNSWFlat obj) {
return (obj == null) ? 0 : obj.swigCPtr;
}
@SuppressWarnings("deprecation")
protected void finalize() {
delete();
}
public synchronized void delete() {
if (swigCPtr != 0) {
if (swigCMemOwn) {
swigCMemOwn = false;
swigfaissJNI.delete_IndexHNSWFlat(swigCPtr);
}
swigCPtr = 0;
}
super.delete();
}
public IndexHNSWFlat() {
this(swigfaissJNI.new_IndexHNSWFlat__SWIG_0(), true);
}
public IndexHNSWFlat(int d, int M, MetricType metric) {
this(swigfaissJNI.new_IndexHNSWFlat__SWIG_1(d, M, metric.swigValue()), true);
}
public IndexHNSWFlat(int d, int M) {
this(swigfaissJNI.new_IndexHNSWFlat__SWIG_2(d, M), true);
}
}

View File

@ -1,51 +0,0 @@
/* ----------------------------------------------------------------------------
* This file was automatically generated by SWIG (http://www.swig.org).
* Version 4.0.2
*
* Do not make changes to this file unless you know what you are doing--modify
* the SWIG interface file instead.
* ----------------------------------------------------------------------------- */
package com.twitter.ann.faiss;
public class IndexHNSWPQ extends IndexHNSW {
private transient long swigCPtr;
protected IndexHNSWPQ(long cPtr, boolean cMemoryOwn) {
super(swigfaissJNI.IndexHNSWPQ_SWIGUpcast(cPtr), cMemoryOwn);
swigCPtr = cPtr;
}
protected static long getCPtr(IndexHNSWPQ obj) {
return (obj == null) ? 0 : obj.swigCPtr;
}
@SuppressWarnings("deprecation")
protected void finalize() {
delete();
}
public synchronized void delete() {
if (swigCPtr != 0) {
if (swigCMemOwn) {
swigCMemOwn = false;
swigfaissJNI.delete_IndexHNSWPQ(swigCPtr);
}
swigCPtr = 0;
}
super.delete();
}
public IndexHNSWPQ() {
this(swigfaissJNI.new_IndexHNSWPQ__SWIG_0(), true);
}
public IndexHNSWPQ(int d, int pq_m, int M) {
this(swigfaissJNI.new_IndexHNSWPQ__SWIG_1(d, pq_m, M), true);
}
public void train(long n, SWIGTYPE_p_float x) {
swigfaissJNI.IndexHNSWPQ_train(swigCPtr, this, n, SWIGTYPE_p_float.getCPtr(x));
}
}

View File

@ -1,51 +0,0 @@
/* ----------------------------------------------------------------------------
* This file was automatically generated by SWIG (http://www.swig.org).
* Version 4.0.2
*
* Do not make changes to this file unless you know what you are doing--modify
* the SWIG interface file instead.
* ----------------------------------------------------------------------------- */
package com.twitter.ann.faiss;
public class IndexHNSWSQ extends IndexHNSW {
private transient long swigCPtr;
protected IndexHNSWSQ(long cPtr, boolean cMemoryOwn) {
super(swigfaissJNI.IndexHNSWSQ_SWIGUpcast(cPtr), cMemoryOwn);
swigCPtr = cPtr;
}
protected static long getCPtr(IndexHNSWSQ obj) {
return (obj == null) ? 0 : obj.swigCPtr;
}
@SuppressWarnings("deprecation")
protected void finalize() {
delete();
}
public synchronized void delete() {
if (swigCPtr != 0) {
if (swigCMemOwn) {
swigCMemOwn = false;
swigfaissJNI.delete_IndexHNSWSQ(swigCPtr);
}
swigCPtr = 0;
}
super.delete();
}
public IndexHNSWSQ() {
this(swigfaissJNI.new_IndexHNSWSQ__SWIG_0(), true);
}
public IndexHNSWSQ(int d, SWIGTYPE_p_ScalarQuantizer__QuantizerType qtype, int M, MetricType metric) {
this(swigfaissJNI.new_IndexHNSWSQ__SWIG_1(d, SWIGTYPE_p_ScalarQuantizer__QuantizerType.getCPtr(qtype), M, metric.swigValue()), true);
}
public IndexHNSWSQ(int d, SWIGTYPE_p_ScalarQuantizer__QuantizerType qtype, int M) {
this(swigfaissJNI.new_IndexHNSWSQ__SWIG_2(d, SWIGTYPE_p_ScalarQuantizer__QuantizerType.getCPtr(qtype), M), true);
}
}

View File

@ -1,101 +0,0 @@
/* ----------------------------------------------------------------------------
* This file was automatically generated by SWIG (http://www.swig.org).
* Version 4.0.2
*
* Do not make changes to this file unless you know what you are doing--modify
* the SWIG interface file instead.
* ----------------------------------------------------------------------------- */
package com.twitter.ann.faiss;
public class IndexIDMap extends Index {
private transient long swigCPtr;
protected IndexIDMap(long cPtr, boolean cMemoryOwn) {
super(swigfaissJNI.IndexIDMap_SWIGUpcast(cPtr), cMemoryOwn);
swigCPtr = cPtr;
}
protected static long getCPtr(IndexIDMap obj) {
return (obj == null) ? 0 : obj.swigCPtr;
}
@SuppressWarnings("deprecation")
protected void finalize() {
delete();
}
public synchronized void delete() {
if (swigCPtr != 0) {
if (swigCMemOwn) {
swigCMemOwn = false;
swigfaissJNI.delete_IndexIDMap(swigCPtr);
}
swigCPtr = 0;
}
super.delete();
}
public void setIndex(Index value) {
swigfaissJNI.IndexIDMap_index_set(swigCPtr, this, Index.getCPtr(value), value);
}
public Index getIndex() {
long cPtr = swigfaissJNI.IndexIDMap_index_get(swigCPtr, this);
return (cPtr == 0) ? null : new Index(cPtr, false);
}
public void setOwn_fields(boolean value) {
swigfaissJNI.IndexIDMap_own_fields_set(swigCPtr, this, value);
}
public boolean getOwn_fields() {
return swigfaissJNI.IndexIDMap_own_fields_get(swigCPtr, this);
}
public void setId_map(SWIGTYPE_p_std__vectorT_int64_t_t value) {
swigfaissJNI.IndexIDMap_id_map_set(swigCPtr, this, SWIGTYPE_p_std__vectorT_int64_t_t.getCPtr(value));
}
public SWIGTYPE_p_std__vectorT_int64_t_t getId_map() {
long cPtr = swigfaissJNI.IndexIDMap_id_map_get(swigCPtr, this);
return (cPtr == 0) ? null : new SWIGTYPE_p_std__vectorT_int64_t_t(cPtr, false);
}
public IndexIDMap(Index index) {
this(swigfaissJNI.new_IndexIDMap__SWIG_0(Index.getCPtr(index), index), true);
}
public void add_with_ids(long n, SWIGTYPE_p_float x, LongVector xids) {
swigfaissJNI.IndexIDMap_add_with_ids(swigCPtr, this, n, SWIGTYPE_p_float.getCPtr(x), SWIGTYPE_p_long_long.getCPtr(xids.data()), xids);
}
public void add(long n, SWIGTYPE_p_float x) {
swigfaissJNI.IndexIDMap_add(swigCPtr, this, n, SWIGTYPE_p_float.getCPtr(x));
}
public void search(long n, SWIGTYPE_p_float x, long k, SWIGTYPE_p_float distances, LongVector labels) {
swigfaissJNI.IndexIDMap_search(swigCPtr, this, n, SWIGTYPE_p_float.getCPtr(x), k, SWIGTYPE_p_float.getCPtr(distances), SWIGTYPE_p_long_long.getCPtr(labels.data()), labels);
}
public void train(long n, SWIGTYPE_p_float x) {
swigfaissJNI.IndexIDMap_train(swigCPtr, this, n, SWIGTYPE_p_float.getCPtr(x));
}
public void reset() {
swigfaissJNI.IndexIDMap_reset(swigCPtr, this);
}
public long remove_ids(IDSelector sel) {
return swigfaissJNI.IndexIDMap_remove_ids(swigCPtr, this, IDSelector.getCPtr(sel), sel);
}
public void range_search(long n, SWIGTYPE_p_float x, float radius, RangeSearchResult result) {
swigfaissJNI.IndexIDMap_range_search(swigCPtr, this, n, SWIGTYPE_p_float.getCPtr(x), radius, RangeSearchResult.getCPtr(result), result);
}
public IndexIDMap() {
this(swigfaissJNI.new_IndexIDMap__SWIG_1(), true);
}
}

View File

@ -1,250 +0,0 @@
/* ----------------------------------------------------------------------------
* This file was automatically generated by SWIG (http://www.swig.org).
* Version 4.0.2
*
* Do not make changes to this file unless you know what you are doing--modify
* the SWIG interface file instead.
* ----------------------------------------------------------------------------- */
package com.twitter.ann.faiss;
public class IndexIVF extends Index {
private transient long swigCPtr;
protected IndexIVF(long cPtr, boolean cMemoryOwn) {
super(swigfaissJNI.IndexIVF_SWIGUpcast(cPtr), cMemoryOwn);
swigCPtr = cPtr;
}
protected static long getCPtr(IndexIVF obj) {
return (obj == null) ? 0 : obj.swigCPtr;
}
@SuppressWarnings("deprecation")
protected void finalize() {
delete();
}
public synchronized void delete() {
if (swigCPtr != 0) {
if (swigCMemOwn) {
swigCMemOwn = false;
swigfaissJNI.delete_IndexIVF(swigCPtr);
}
swigCPtr = 0;
}
super.delete();
}
public void setInvlists(InvertedLists value) {
swigfaissJNI.IndexIVF_invlists_set(swigCPtr, this, InvertedLists.getCPtr(value), value);
}
public InvertedLists getInvlists() {
long cPtr = swigfaissJNI.IndexIVF_invlists_get(swigCPtr, this);
return (cPtr == 0) ? null : new InvertedLists(cPtr, false);
}
public void setOwn_invlists(boolean value) {
swigfaissJNI.IndexIVF_own_invlists_set(swigCPtr, this, value);
}
public boolean getOwn_invlists() {
return swigfaissJNI.IndexIVF_own_invlists_get(swigCPtr, this);
}
public void setCode_size(long value) {
swigfaissJNI.IndexIVF_code_size_set(swigCPtr, this, value);
}
public long getCode_size() {
return swigfaissJNI.IndexIVF_code_size_get(swigCPtr, this);
}
public void setNprobe(long value) {
swigfaissJNI.IndexIVF_nprobe_set(swigCPtr, this, value);
}
public long getNprobe() {
return swigfaissJNI.IndexIVF_nprobe_get(swigCPtr, this);
}
public void setMax_codes(long value) {
swigfaissJNI.IndexIVF_max_codes_set(swigCPtr, this, value);
}
public long getMax_codes() {
return swigfaissJNI.IndexIVF_max_codes_get(swigCPtr, this);
}
public void setParallel_mode(int value) {
swigfaissJNI.IndexIVF_parallel_mode_set(swigCPtr, this, value);
}
public int getParallel_mode() {
return swigfaissJNI.IndexIVF_parallel_mode_get(swigCPtr, this);
}
public int getPARALLEL_MODE_NO_HEAP_INIT() {
return swigfaissJNI.IndexIVF_PARALLEL_MODE_NO_HEAP_INIT_get(swigCPtr, this);
}
public void setDirect_map(SWIGTYPE_p_DirectMap value) {
swigfaissJNI.IndexIVF_direct_map_set(swigCPtr, this, SWIGTYPE_p_DirectMap.getCPtr(value));
}
public SWIGTYPE_p_DirectMap getDirect_map() {
return new SWIGTYPE_p_DirectMap(swigfaissJNI.IndexIVF_direct_map_get(swigCPtr, this), true);
}
public void reset() {
swigfaissJNI.IndexIVF_reset(swigCPtr, this);
}
public void train(long n, SWIGTYPE_p_float x) {
swigfaissJNI.IndexIVF_train(swigCPtr, this, n, SWIGTYPE_p_float.getCPtr(x));
}
public void add(long n, SWIGTYPE_p_float x) {
swigfaissJNI.IndexIVF_add(swigCPtr, this, n, SWIGTYPE_p_float.getCPtr(x));
}
public void add_with_ids(long n, SWIGTYPE_p_float x, LongVector xids) {
swigfaissJNI.IndexIVF_add_with_ids(swigCPtr, this, n, SWIGTYPE_p_float.getCPtr(x), SWIGTYPE_p_long_long.getCPtr(xids.data()), xids);
}
public void add_core(long n, SWIGTYPE_p_float x, LongVector xids, LongVector precomputed_idx) {
swigfaissJNI.IndexIVF_add_core(swigCPtr, this, n, SWIGTYPE_p_float.getCPtr(x), SWIGTYPE_p_long_long.getCPtr(xids.data()), xids, SWIGTYPE_p_long_long.getCPtr(precomputed_idx.data()), precomputed_idx);
}
public void encode_vectors(long n, SWIGTYPE_p_float x, LongVector list_nos, SWIGTYPE_p_unsigned_char codes, boolean include_listno) {
swigfaissJNI.IndexIVF_encode_vectors__SWIG_0(swigCPtr, this, n, SWIGTYPE_p_float.getCPtr(x), SWIGTYPE_p_long_long.getCPtr(list_nos.data()), list_nos, SWIGTYPE_p_unsigned_char.getCPtr(codes), include_listno);
}
public void encode_vectors(long n, SWIGTYPE_p_float x, LongVector list_nos, SWIGTYPE_p_unsigned_char codes) {
swigfaissJNI.IndexIVF_encode_vectors__SWIG_1(swigCPtr, this, n, SWIGTYPE_p_float.getCPtr(x), SWIGTYPE_p_long_long.getCPtr(list_nos.data()), list_nos, SWIGTYPE_p_unsigned_char.getCPtr(codes));
}
public void add_sa_codes(long n, SWIGTYPE_p_unsigned_char codes, LongVector xids) {
swigfaissJNI.IndexIVF_add_sa_codes(swigCPtr, this, n, SWIGTYPE_p_unsigned_char.getCPtr(codes), SWIGTYPE_p_long_long.getCPtr(xids.data()), xids);
}
public void train_residual(long n, SWIGTYPE_p_float x) {
swigfaissJNI.IndexIVF_train_residual(swigCPtr, this, n, SWIGTYPE_p_float.getCPtr(x));
}
public void search_preassigned(long n, SWIGTYPE_p_float x, long k, LongVector assign, SWIGTYPE_p_float centroid_dis, SWIGTYPE_p_float distances, LongVector labels, boolean store_pairs, IVFSearchParameters params, IndexIVFStats stats) {
swigfaissJNI.IndexIVF_search_preassigned__SWIG_0(swigCPtr, this, n, SWIGTYPE_p_float.getCPtr(x), k, SWIGTYPE_p_long_long.getCPtr(assign.data()), assign, SWIGTYPE_p_float.getCPtr(centroid_dis), SWIGTYPE_p_float.getCPtr(distances), SWIGTYPE_p_long_long.getCPtr(labels.data()), labels, store_pairs, IVFSearchParameters.getCPtr(params), params, IndexIVFStats.getCPtr(stats), stats);
}
public void search_preassigned(long n, SWIGTYPE_p_float x, long k, LongVector assign, SWIGTYPE_p_float centroid_dis, SWIGTYPE_p_float distances, LongVector labels, boolean store_pairs, IVFSearchParameters params) {
swigfaissJNI.IndexIVF_search_preassigned__SWIG_1(swigCPtr, this, n, SWIGTYPE_p_float.getCPtr(x), k, SWIGTYPE_p_long_long.getCPtr(assign.data()), assign, SWIGTYPE_p_float.getCPtr(centroid_dis), SWIGTYPE_p_float.getCPtr(distances), SWIGTYPE_p_long_long.getCPtr(labels.data()), labels, store_pairs, IVFSearchParameters.getCPtr(params), params);
}
public void search_preassigned(long n, SWIGTYPE_p_float x, long k, LongVector assign, SWIGTYPE_p_float centroid_dis, SWIGTYPE_p_float distances, LongVector labels, boolean store_pairs) {
swigfaissJNI.IndexIVF_search_preassigned__SWIG_2(swigCPtr, this, n, SWIGTYPE_p_float.getCPtr(x), k, SWIGTYPE_p_long_long.getCPtr(assign.data()), assign, SWIGTYPE_p_float.getCPtr(centroid_dis), SWIGTYPE_p_float.getCPtr(distances), SWIGTYPE_p_long_long.getCPtr(labels.data()), labels, store_pairs);
}
public void search(long n, SWIGTYPE_p_float x, long k, SWIGTYPE_p_float distances, LongVector labels) {
swigfaissJNI.IndexIVF_search(swigCPtr, this, n, SWIGTYPE_p_float.getCPtr(x), k, SWIGTYPE_p_float.getCPtr(distances), SWIGTYPE_p_long_long.getCPtr(labels.data()), labels);
}
public void range_search(long n, SWIGTYPE_p_float x, float radius, RangeSearchResult result) {
swigfaissJNI.IndexIVF_range_search(swigCPtr, this, n, SWIGTYPE_p_float.getCPtr(x), radius, RangeSearchResult.getCPtr(result), result);
}
public void range_search_preassigned(long nx, SWIGTYPE_p_float x, float radius, LongVector keys, SWIGTYPE_p_float coarse_dis, RangeSearchResult result, boolean store_pairs, IVFSearchParameters params, IndexIVFStats stats) {
swigfaissJNI.IndexIVF_range_search_preassigned__SWIG_0(swigCPtr, this, nx, SWIGTYPE_p_float.getCPtr(x), radius, SWIGTYPE_p_long_long.getCPtr(keys.data()), keys, SWIGTYPE_p_float.getCPtr(coarse_dis), RangeSearchResult.getCPtr(result), result, store_pairs, IVFSearchParameters.getCPtr(params), params, IndexIVFStats.getCPtr(stats), stats);
}
public void range_search_preassigned(long nx, SWIGTYPE_p_float x, float radius, LongVector keys, SWIGTYPE_p_float coarse_dis, RangeSearchResult result, boolean store_pairs, IVFSearchParameters params) {
swigfaissJNI.IndexIVF_range_search_preassigned__SWIG_1(swigCPtr, this, nx, SWIGTYPE_p_float.getCPtr(x), radius, SWIGTYPE_p_long_long.getCPtr(keys.data()), keys, SWIGTYPE_p_float.getCPtr(coarse_dis), RangeSearchResult.getCPtr(result), result, store_pairs, IVFSearchParameters.getCPtr(params), params);
}
public void range_search_preassigned(long nx, SWIGTYPE_p_float x, float radius, LongVector keys, SWIGTYPE_p_float coarse_dis, RangeSearchResult result, boolean store_pairs) {
swigfaissJNI.IndexIVF_range_search_preassigned__SWIG_2(swigCPtr, this, nx, SWIGTYPE_p_float.getCPtr(x), radius, SWIGTYPE_p_long_long.getCPtr(keys.data()), keys, SWIGTYPE_p_float.getCPtr(coarse_dis), RangeSearchResult.getCPtr(result), result, store_pairs);
}
public void range_search_preassigned(long nx, SWIGTYPE_p_float x, float radius, LongVector keys, SWIGTYPE_p_float coarse_dis, RangeSearchResult result) {
swigfaissJNI.IndexIVF_range_search_preassigned__SWIG_3(swigCPtr, this, nx, SWIGTYPE_p_float.getCPtr(x), radius, SWIGTYPE_p_long_long.getCPtr(keys.data()), keys, SWIGTYPE_p_float.getCPtr(coarse_dis), RangeSearchResult.getCPtr(result), result);
}
public SWIGTYPE_p_faiss__InvertedListScanner get_InvertedListScanner(boolean store_pairs) {
long cPtr = swigfaissJNI.IndexIVF_get_InvertedListScanner__SWIG_0(swigCPtr, this, store_pairs);
return (cPtr == 0) ? null : new SWIGTYPE_p_faiss__InvertedListScanner(cPtr, false);
}
public SWIGTYPE_p_faiss__InvertedListScanner get_InvertedListScanner() {
long cPtr = swigfaissJNI.IndexIVF_get_InvertedListScanner__SWIG_1(swigCPtr, this);
return (cPtr == 0) ? null : new SWIGTYPE_p_faiss__InvertedListScanner(cPtr, false);
}
public void reconstruct(long key, SWIGTYPE_p_float recons) {
swigfaissJNI.IndexIVF_reconstruct(swigCPtr, this, key, SWIGTYPE_p_float.getCPtr(recons));
}
public void update_vectors(int nv, LongVector idx, SWIGTYPE_p_float v) {
swigfaissJNI.IndexIVF_update_vectors(swigCPtr, this, nv, SWIGTYPE_p_long_long.getCPtr(idx.data()), idx, SWIGTYPE_p_float.getCPtr(v));
}
public void reconstruct_n(long i0, long ni, SWIGTYPE_p_float recons) {
swigfaissJNI.IndexIVF_reconstruct_n(swigCPtr, this, i0, ni, SWIGTYPE_p_float.getCPtr(recons));
}
public void search_and_reconstruct(long n, SWIGTYPE_p_float x, long k, SWIGTYPE_p_float distances, LongVector labels, SWIGTYPE_p_float recons) {
swigfaissJNI.IndexIVF_search_and_reconstruct(swigCPtr, this, n, SWIGTYPE_p_float.getCPtr(x), k, SWIGTYPE_p_float.getCPtr(distances), SWIGTYPE_p_long_long.getCPtr(labels.data()), labels, SWIGTYPE_p_float.getCPtr(recons));
}
public void reconstruct_from_offset(long list_no, long offset, SWIGTYPE_p_float recons) {
swigfaissJNI.IndexIVF_reconstruct_from_offset(swigCPtr, this, list_no, offset, SWIGTYPE_p_float.getCPtr(recons));
}
public long remove_ids(IDSelector sel) {
return swigfaissJNI.IndexIVF_remove_ids(swigCPtr, this, IDSelector.getCPtr(sel), sel);
}
public void check_compatible_for_merge(IndexIVF other) {
swigfaissJNI.IndexIVF_check_compatible_for_merge(swigCPtr, this, IndexIVF.getCPtr(other), other);
}
public void merge_from(IndexIVF other, long add_id) {
swigfaissJNI.IndexIVF_merge_from(swigCPtr, this, IndexIVF.getCPtr(other), other, add_id);
}
public void copy_subset_to(IndexIVF other, int subset_type, long a1, long a2) {
swigfaissJNI.IndexIVF_copy_subset_to(swigCPtr, this, IndexIVF.getCPtr(other), other, subset_type, a1, a2);
}
public long get_list_size(long list_no) {
return swigfaissJNI.IndexIVF_get_list_size(swigCPtr, this, list_no);
}
public void make_direct_map(boolean new_maintain_direct_map) {
swigfaissJNI.IndexIVF_make_direct_map__SWIG_0(swigCPtr, this, new_maintain_direct_map);
}
public void make_direct_map() {
swigfaissJNI.IndexIVF_make_direct_map__SWIG_1(swigCPtr, this);
}
public void set_direct_map_type(SWIGTYPE_p_DirectMap__Type type) {
swigfaissJNI.IndexIVF_set_direct_map_type(swigCPtr, this, SWIGTYPE_p_DirectMap__Type.getCPtr(type));
}
public void replace_invlists(InvertedLists il, boolean own) {
swigfaissJNI.IndexIVF_replace_invlists__SWIG_0(swigCPtr, this, InvertedLists.getCPtr(il), il, own);
}
public void replace_invlists(InvertedLists il) {
swigfaissJNI.IndexIVF_replace_invlists__SWIG_1(swigCPtr, this, InvertedLists.getCPtr(il), il);
}
public long sa_code_size() {
return swigfaissJNI.IndexIVF_sa_code_size(swigCPtr, this);
}
public void sa_encode(long n, SWIGTYPE_p_float x, SWIGTYPE_p_unsigned_char bytes) {
swigfaissJNI.IndexIVF_sa_encode(swigCPtr, this, n, SWIGTYPE_p_float.getCPtr(x), SWIGTYPE_p_unsigned_char.getCPtr(bytes));
}
}

View File

@ -1,76 +0,0 @@
/* ----------------------------------------------------------------------------
* This file was automatically generated by SWIG (http://www.swig.org).
* Version 4.0.2
*
* Do not make changes to this file unless you know what you are doing--modify
* the SWIG interface file instead.
* ----------------------------------------------------------------------------- */
package com.twitter.ann.faiss;
public class IndexIVFFlat extends IndexIVF {
private transient long swigCPtr;
protected IndexIVFFlat(long cPtr, boolean cMemoryOwn) {
super(swigfaissJNI.IndexIVFFlat_SWIGUpcast(cPtr), cMemoryOwn);
swigCPtr = cPtr;
}
protected static long getCPtr(IndexIVFFlat obj) {
return (obj == null) ? 0 : obj.swigCPtr;
}
@SuppressWarnings("deprecation")
protected void finalize() {
delete();
}
public synchronized void delete() {
if (swigCPtr != 0) {
if (swigCMemOwn) {
swigCMemOwn = false;
swigfaissJNI.delete_IndexIVFFlat(swigCPtr);
}
swigCPtr = 0;
}
super.delete();
}
public IndexIVFFlat(Index quantizer, long d, long nlist_, MetricType arg3) {
this(swigfaissJNI.new_IndexIVFFlat__SWIG_0(Index.getCPtr(quantizer), quantizer, d, nlist_, arg3.swigValue()), true);
}
public IndexIVFFlat(Index quantizer, long d, long nlist_) {
this(swigfaissJNI.new_IndexIVFFlat__SWIG_1(Index.getCPtr(quantizer), quantizer, d, nlist_), true);
}
public void add_core(long n, SWIGTYPE_p_float x, LongVector xids, LongVector precomputed_idx) {
swigfaissJNI.IndexIVFFlat_add_core(swigCPtr, this, n, SWIGTYPE_p_float.getCPtr(x), SWIGTYPE_p_long_long.getCPtr(xids.data()), xids, SWIGTYPE_p_long_long.getCPtr(precomputed_idx.data()), precomputed_idx);
}
public void encode_vectors(long n, SWIGTYPE_p_float x, LongVector list_nos, SWIGTYPE_p_unsigned_char codes, boolean include_listnos) {
swigfaissJNI.IndexIVFFlat_encode_vectors__SWIG_0(swigCPtr, this, n, SWIGTYPE_p_float.getCPtr(x), SWIGTYPE_p_long_long.getCPtr(list_nos.data()), list_nos, SWIGTYPE_p_unsigned_char.getCPtr(codes), include_listnos);
}
public void encode_vectors(long n, SWIGTYPE_p_float x, LongVector list_nos, SWIGTYPE_p_unsigned_char codes) {
swigfaissJNI.IndexIVFFlat_encode_vectors__SWIG_1(swigCPtr, this, n, SWIGTYPE_p_float.getCPtr(x), SWIGTYPE_p_long_long.getCPtr(list_nos.data()), list_nos, SWIGTYPE_p_unsigned_char.getCPtr(codes));
}
public SWIGTYPE_p_faiss__InvertedListScanner get_InvertedListScanner(boolean store_pairs) {
long cPtr = swigfaissJNI.IndexIVFFlat_get_InvertedListScanner(swigCPtr, this, store_pairs);
return (cPtr == 0) ? null : new SWIGTYPE_p_faiss__InvertedListScanner(cPtr, false);
}
public void reconstruct_from_offset(long list_no, long offset, SWIGTYPE_p_float recons) {
swigfaissJNI.IndexIVFFlat_reconstruct_from_offset(swigCPtr, this, list_no, offset, SWIGTYPE_p_float.getCPtr(recons));
}
public void sa_decode(long n, SWIGTYPE_p_unsigned_char bytes, SWIGTYPE_p_float x) {
swigfaissJNI.IndexIVFFlat_sa_decode(swigCPtr, this, n, SWIGTYPE_p_unsigned_char.getCPtr(bytes), SWIGTYPE_p_float.getCPtr(x));
}
public IndexIVFFlat() {
this(swigfaissJNI.new_IndexIVFFlat__SWIG_2(), true);
}
}

View File

@ -1,95 +0,0 @@
/* ----------------------------------------------------------------------------
* This file was automatically generated by SWIG (http://www.swig.org).
* Version 4.0.2
*
* Do not make changes to this file unless you know what you are doing--modify
* the SWIG interface file instead.
* ----------------------------------------------------------------------------- */
package com.twitter.ann.faiss;
public class IndexIVFFlatDedup extends IndexIVFFlat {
private transient long swigCPtr;
protected IndexIVFFlatDedup(long cPtr, boolean cMemoryOwn) {
super(swigfaissJNI.IndexIVFFlatDedup_SWIGUpcast(cPtr), cMemoryOwn);
swigCPtr = cPtr;
}
protected static long getCPtr(IndexIVFFlatDedup obj) {
return (obj == null) ? 0 : obj.swigCPtr;
}
@SuppressWarnings("deprecation")
protected void finalize() {
delete();
}
public synchronized void delete() {
if (swigCPtr != 0) {
if (swigCMemOwn) {
swigCMemOwn = false;
swigfaissJNI.delete_IndexIVFFlatDedup(swigCPtr);
}
swigCPtr = 0;
}
super.delete();
}
public void setInstances(SWIGTYPE_p_std__unordered_multimapT_int64_t_int64_t_t value) {
swigfaissJNI.IndexIVFFlatDedup_instances_set(swigCPtr, this, SWIGTYPE_p_std__unordered_multimapT_int64_t_int64_t_t.getCPtr(value));
}
public SWIGTYPE_p_std__unordered_multimapT_int64_t_int64_t_t getInstances() {
return new SWIGTYPE_p_std__unordered_multimapT_int64_t_int64_t_t(swigfaissJNI.IndexIVFFlatDedup_instances_get(swigCPtr, this), true);
}
public IndexIVFFlatDedup(Index quantizer, long d, long nlist_, MetricType arg3) {
this(swigfaissJNI.new_IndexIVFFlatDedup__SWIG_0(Index.getCPtr(quantizer), quantizer, d, nlist_, arg3.swigValue()), true);
}
public IndexIVFFlatDedup(Index quantizer, long d, long nlist_) {
this(swigfaissJNI.new_IndexIVFFlatDedup__SWIG_1(Index.getCPtr(quantizer), quantizer, d, nlist_), true);
}
public void train(long n, SWIGTYPE_p_float x) {
swigfaissJNI.IndexIVFFlatDedup_train(swigCPtr, this, n, SWIGTYPE_p_float.getCPtr(x));
}
public void add_with_ids(long n, SWIGTYPE_p_float x, LongVector xids) {
swigfaissJNI.IndexIVFFlatDedup_add_with_ids(swigCPtr, this, n, SWIGTYPE_p_float.getCPtr(x), SWIGTYPE_p_long_long.getCPtr(xids.data()), xids);
}
public void search_preassigned(long n, SWIGTYPE_p_float x, long k, LongVector assign, SWIGTYPE_p_float centroid_dis, SWIGTYPE_p_float distances, LongVector labels, boolean store_pairs, IVFSearchParameters params, IndexIVFStats stats) {
swigfaissJNI.IndexIVFFlatDedup_search_preassigned__SWIG_0(swigCPtr, this, n, SWIGTYPE_p_float.getCPtr(x), k, SWIGTYPE_p_long_long.getCPtr(assign.data()), assign, SWIGTYPE_p_float.getCPtr(centroid_dis), SWIGTYPE_p_float.getCPtr(distances), SWIGTYPE_p_long_long.getCPtr(labels.data()), labels, store_pairs, IVFSearchParameters.getCPtr(params), params, IndexIVFStats.getCPtr(stats), stats);
}
public void search_preassigned(long n, SWIGTYPE_p_float x, long k, LongVector assign, SWIGTYPE_p_float centroid_dis, SWIGTYPE_p_float distances, LongVector labels, boolean store_pairs, IVFSearchParameters params) {
swigfaissJNI.IndexIVFFlatDedup_search_preassigned__SWIG_1(swigCPtr, this, n, SWIGTYPE_p_float.getCPtr(x), k, SWIGTYPE_p_long_long.getCPtr(assign.data()), assign, SWIGTYPE_p_float.getCPtr(centroid_dis), SWIGTYPE_p_float.getCPtr(distances), SWIGTYPE_p_long_long.getCPtr(labels.data()), labels, store_pairs, IVFSearchParameters.getCPtr(params), params);
}
public void search_preassigned(long n, SWIGTYPE_p_float x, long k, LongVector assign, SWIGTYPE_p_float centroid_dis, SWIGTYPE_p_float distances, LongVector labels, boolean store_pairs) {
swigfaissJNI.IndexIVFFlatDedup_search_preassigned__SWIG_2(swigCPtr, this, n, SWIGTYPE_p_float.getCPtr(x), k, SWIGTYPE_p_long_long.getCPtr(assign.data()), assign, SWIGTYPE_p_float.getCPtr(centroid_dis), SWIGTYPE_p_float.getCPtr(distances), SWIGTYPE_p_long_long.getCPtr(labels.data()), labels, store_pairs);
}
public long remove_ids(IDSelector sel) {
return swigfaissJNI.IndexIVFFlatDedup_remove_ids(swigCPtr, this, IDSelector.getCPtr(sel), sel);
}
public void range_search(long n, SWIGTYPE_p_float x, float radius, RangeSearchResult result) {
swigfaissJNI.IndexIVFFlatDedup_range_search(swigCPtr, this, n, SWIGTYPE_p_float.getCPtr(x), radius, RangeSearchResult.getCPtr(result), result);
}
public void update_vectors(int nv, LongVector idx, SWIGTYPE_p_float v) {
swigfaissJNI.IndexIVFFlatDedup_update_vectors(swigCPtr, this, nv, SWIGTYPE_p_long_long.getCPtr(idx.data()), idx, SWIGTYPE_p_float.getCPtr(v));
}
public void reconstruct_from_offset(long list_no, long offset, SWIGTYPE_p_float recons) {
swigfaissJNI.IndexIVFFlatDedup_reconstruct_from_offset(swigCPtr, this, list_no, offset, SWIGTYPE_p_float.getCPtr(recons));
}
public IndexIVFFlatDedup() {
this(swigfaissJNI.new_IndexIVFFlatDedup__SWIG_2(), true);
}
}

View File

@ -1,182 +0,0 @@
/* ----------------------------------------------------------------------------
* This file was automatically generated by SWIG (http://www.swig.org).
* Version 4.0.2
*
* Do not make changes to this file unless you know what you are doing--modify
* the SWIG interface file instead.
* ----------------------------------------------------------------------------- */
package com.twitter.ann.faiss;
public class IndexIVFPQ extends IndexIVF {
private transient long swigCPtr;
protected IndexIVFPQ(long cPtr, boolean cMemoryOwn) {
super(swigfaissJNI.IndexIVFPQ_SWIGUpcast(cPtr), cMemoryOwn);
swigCPtr = cPtr;
}
protected static long getCPtr(IndexIVFPQ obj) {
return (obj == null) ? 0 : obj.swigCPtr;
}
@SuppressWarnings("deprecation")
protected void finalize() {
delete();
}
public synchronized void delete() {
if (swigCPtr != 0) {
if (swigCMemOwn) {
swigCMemOwn = false;
swigfaissJNI.delete_IndexIVFPQ(swigCPtr);
}
swigCPtr = 0;
}
super.delete();
}
public void setBy_residual(boolean value) {
swigfaissJNI.IndexIVFPQ_by_residual_set(swigCPtr, this, value);
}
public boolean getBy_residual() {
return swigfaissJNI.IndexIVFPQ_by_residual_get(swigCPtr, this);
}
public void setPq(ProductQuantizer value) {
swigfaissJNI.IndexIVFPQ_pq_set(swigCPtr, this, ProductQuantizer.getCPtr(value), value);
}
public ProductQuantizer getPq() {
long cPtr = swigfaissJNI.IndexIVFPQ_pq_get(swigCPtr, this);
return (cPtr == 0) ? null : new ProductQuantizer(cPtr, false);
}
public void setDo_polysemous_training(boolean value) {
swigfaissJNI.IndexIVFPQ_do_polysemous_training_set(swigCPtr, this, value);
}
public boolean getDo_polysemous_training() {
return swigfaissJNI.IndexIVFPQ_do_polysemous_training_get(swigCPtr, this);
}
public void setPolysemous_training(PolysemousTraining value) {
swigfaissJNI.IndexIVFPQ_polysemous_training_set(swigCPtr, this, PolysemousTraining.getCPtr(value), value);
}
public PolysemousTraining getPolysemous_training() {
long cPtr = swigfaissJNI.IndexIVFPQ_polysemous_training_get(swigCPtr, this);
return (cPtr == 0) ? null : new PolysemousTraining(cPtr, false);
}
public void setScan_table_threshold(long value) {
swigfaissJNI.IndexIVFPQ_scan_table_threshold_set(swigCPtr, this, value);
}
public long getScan_table_threshold() {
return swigfaissJNI.IndexIVFPQ_scan_table_threshold_get(swigCPtr, this);
}
public void setPolysemous_ht(int value) {
swigfaissJNI.IndexIVFPQ_polysemous_ht_set(swigCPtr, this, value);
}
public int getPolysemous_ht() {
return swigfaissJNI.IndexIVFPQ_polysemous_ht_get(swigCPtr, this);
}
public void setUse_precomputed_table(int value) {
swigfaissJNI.IndexIVFPQ_use_precomputed_table_set(swigCPtr, this, value);
}
public int getUse_precomputed_table() {
return swigfaissJNI.IndexIVFPQ_use_precomputed_table_get(swigCPtr, this);
}
public void setPrecomputed_table(SWIGTYPE_p_AlignedTableT_float_t value) {
swigfaissJNI.IndexIVFPQ_precomputed_table_set(swigCPtr, this, SWIGTYPE_p_AlignedTableT_float_t.getCPtr(value));
}
public SWIGTYPE_p_AlignedTableT_float_t getPrecomputed_table() {
return new SWIGTYPE_p_AlignedTableT_float_t(swigfaissJNI.IndexIVFPQ_precomputed_table_get(swigCPtr, this), true);
}
public IndexIVFPQ(Index quantizer, long d, long nlist, long M, long nbits_per_idx, MetricType metric) {
this(swigfaissJNI.new_IndexIVFPQ__SWIG_0(Index.getCPtr(quantizer), quantizer, d, nlist, M, nbits_per_idx, metric.swigValue()), true);
}
public IndexIVFPQ(Index quantizer, long d, long nlist, long M, long nbits_per_idx) {
this(swigfaissJNI.new_IndexIVFPQ__SWIG_1(Index.getCPtr(quantizer), quantizer, d, nlist, M, nbits_per_idx), true);
}
public void encode_vectors(long n, SWIGTYPE_p_float x, LongVector list_nos, SWIGTYPE_p_unsigned_char codes, boolean include_listnos) {
swigfaissJNI.IndexIVFPQ_encode_vectors__SWIG_0(swigCPtr, this, n, SWIGTYPE_p_float.getCPtr(x), SWIGTYPE_p_long_long.getCPtr(list_nos.data()), list_nos, SWIGTYPE_p_unsigned_char.getCPtr(codes), include_listnos);
}
public void encode_vectors(long n, SWIGTYPE_p_float x, LongVector list_nos, SWIGTYPE_p_unsigned_char codes) {
swigfaissJNI.IndexIVFPQ_encode_vectors__SWIG_1(swigCPtr, this, n, SWIGTYPE_p_float.getCPtr(x), SWIGTYPE_p_long_long.getCPtr(list_nos.data()), list_nos, SWIGTYPE_p_unsigned_char.getCPtr(codes));
}
public void sa_decode(long n, SWIGTYPE_p_unsigned_char bytes, SWIGTYPE_p_float x) {
swigfaissJNI.IndexIVFPQ_sa_decode(swigCPtr, this, n, SWIGTYPE_p_unsigned_char.getCPtr(bytes), SWIGTYPE_p_float.getCPtr(x));
}
public void add_core(long n, SWIGTYPE_p_float x, LongVector xids, LongVector precomputed_idx) {
swigfaissJNI.IndexIVFPQ_add_core(swigCPtr, this, n, SWIGTYPE_p_float.getCPtr(x), SWIGTYPE_p_long_long.getCPtr(xids.data()), xids, SWIGTYPE_p_long_long.getCPtr(precomputed_idx.data()), precomputed_idx);
}
public void add_core_o(long n, SWIGTYPE_p_float x, LongVector xids, SWIGTYPE_p_float residuals_2, LongVector precomputed_idx) {
swigfaissJNI.IndexIVFPQ_add_core_o__SWIG_0(swigCPtr, this, n, SWIGTYPE_p_float.getCPtr(x), SWIGTYPE_p_long_long.getCPtr(xids.data()), xids, SWIGTYPE_p_float.getCPtr(residuals_2), SWIGTYPE_p_long_long.getCPtr(precomputed_idx.data()), precomputed_idx);
}
public void add_core_o(long n, SWIGTYPE_p_float x, LongVector xids, SWIGTYPE_p_float residuals_2) {
swigfaissJNI.IndexIVFPQ_add_core_o__SWIG_1(swigCPtr, this, n, SWIGTYPE_p_float.getCPtr(x), SWIGTYPE_p_long_long.getCPtr(xids.data()), xids, SWIGTYPE_p_float.getCPtr(residuals_2));
}
public void train_residual(long n, SWIGTYPE_p_float x) {
swigfaissJNI.IndexIVFPQ_train_residual(swigCPtr, this, n, SWIGTYPE_p_float.getCPtr(x));
}
public void train_residual_o(long n, SWIGTYPE_p_float x, SWIGTYPE_p_float residuals_2) {
swigfaissJNI.IndexIVFPQ_train_residual_o(swigCPtr, this, n, SWIGTYPE_p_float.getCPtr(x), SWIGTYPE_p_float.getCPtr(residuals_2));
}
public void reconstruct_from_offset(long list_no, long offset, SWIGTYPE_p_float recons) {
swigfaissJNI.IndexIVFPQ_reconstruct_from_offset(swigCPtr, this, list_no, offset, SWIGTYPE_p_float.getCPtr(recons));
}
public long find_duplicates(LongVector ids, SWIGTYPE_p_unsigned_long lims) {
return swigfaissJNI.IndexIVFPQ_find_duplicates(swigCPtr, this, SWIGTYPE_p_long_long.getCPtr(ids.data()), ids, SWIGTYPE_p_unsigned_long.getCPtr(lims));
}
public void encode(long key, SWIGTYPE_p_float x, SWIGTYPE_p_unsigned_char code) {
swigfaissJNI.IndexIVFPQ_encode(swigCPtr, this, key, SWIGTYPE_p_float.getCPtr(x), SWIGTYPE_p_unsigned_char.getCPtr(code));
}
public void encode_multiple(long n, LongVector keys, SWIGTYPE_p_float x, SWIGTYPE_p_unsigned_char codes, boolean compute_keys) {
swigfaissJNI.IndexIVFPQ_encode_multiple__SWIG_0(swigCPtr, this, n, SWIGTYPE_p_long_long.getCPtr(keys.data()), keys, SWIGTYPE_p_float.getCPtr(x), SWIGTYPE_p_unsigned_char.getCPtr(codes), compute_keys);
}
public void encode_multiple(long n, LongVector keys, SWIGTYPE_p_float x, SWIGTYPE_p_unsigned_char codes) {
swigfaissJNI.IndexIVFPQ_encode_multiple__SWIG_1(swigCPtr, this, n, SWIGTYPE_p_long_long.getCPtr(keys.data()), keys, SWIGTYPE_p_float.getCPtr(x), SWIGTYPE_p_unsigned_char.getCPtr(codes));
}
public void decode_multiple(long n, LongVector keys, SWIGTYPE_p_unsigned_char xcodes, SWIGTYPE_p_float x) {
swigfaissJNI.IndexIVFPQ_decode_multiple(swigCPtr, this, n, SWIGTYPE_p_long_long.getCPtr(keys.data()), keys, SWIGTYPE_p_unsigned_char.getCPtr(xcodes), SWIGTYPE_p_float.getCPtr(x));
}
public SWIGTYPE_p_faiss__InvertedListScanner get_InvertedListScanner(boolean store_pairs) {
long cPtr = swigfaissJNI.IndexIVFPQ_get_InvertedListScanner(swigCPtr, this, store_pairs);
return (cPtr == 0) ? null : new SWIGTYPE_p_faiss__InvertedListScanner(cPtr, false);
}
public void precompute_table() {
swigfaissJNI.IndexIVFPQ_precompute_table(swigCPtr, this);
}
public IndexIVFPQ() {
this(swigfaissJNI.new_IndexIVFPQ__SWIG_2(), true);
}
}

View File

@ -1,79 +0,0 @@
/* ----------------------------------------------------------------------------
* This file was automatically generated by SWIG (http://www.swig.org).
* Version 4.0.2
*
* Do not make changes to this file unless you know what you are doing--modify
* the SWIG interface file instead.
* ----------------------------------------------------------------------------- */
package com.twitter.ann.faiss;
public class IndexIVFPQStats {
private transient long swigCPtr;
protected transient boolean swigCMemOwn;
protected IndexIVFPQStats(long cPtr, boolean cMemoryOwn) {
swigCMemOwn = cMemoryOwn;
swigCPtr = cPtr;
}
protected static long getCPtr(IndexIVFPQStats obj) {
return (obj == null) ? 0 : obj.swigCPtr;
}
@SuppressWarnings("deprecation")
protected void finalize() {
delete();
}
public synchronized void delete() {
if (swigCPtr != 0) {
if (swigCMemOwn) {
swigCMemOwn = false;
swigfaissJNI.delete_IndexIVFPQStats(swigCPtr);
}
swigCPtr = 0;
}
}
public void setNrefine(long value) {
swigfaissJNI.IndexIVFPQStats_nrefine_set(swigCPtr, this, value);
}
public long getNrefine() {
return swigfaissJNI.IndexIVFPQStats_nrefine_get(swigCPtr, this);
}
public void setN_hamming_pass(long value) {
swigfaissJNI.IndexIVFPQStats_n_hamming_pass_set(swigCPtr, this, value);
}
public long getN_hamming_pass() {
return swigfaissJNI.IndexIVFPQStats_n_hamming_pass_get(swigCPtr, this);
}
public void setSearch_cycles(long value) {
swigfaissJNI.IndexIVFPQStats_search_cycles_set(swigCPtr, this, value);
}
public long getSearch_cycles() {
return swigfaissJNI.IndexIVFPQStats_search_cycles_get(swigCPtr, this);
}
public void setRefine_cycles(long value) {
swigfaissJNI.IndexIVFPQStats_refine_cycles_set(swigCPtr, this, value);
}
public long getRefine_cycles() {
return swigfaissJNI.IndexIVFPQStats_refine_cycles_get(swigCPtr, this);
}
public IndexIVFPQStats() {
this(swigfaissJNI.new_IndexIVFPQStats(), true);
}
public void reset() {
swigfaissJNI.IndexIVFPQStats_reset(swigCPtr, this);
}
}

View File

@ -1,100 +0,0 @@
/* ----------------------------------------------------------------------------
* This file was automatically generated by SWIG (http://www.swig.org).
* Version 4.0.2
*
* Do not make changes to this file unless you know what you are doing--modify
* the SWIG interface file instead.
* ----------------------------------------------------------------------------- */
package com.twitter.ann.faiss;
public class IndexIVFScalarQuantizer extends IndexIVF {
private transient long swigCPtr;
protected IndexIVFScalarQuantizer(long cPtr, boolean cMemoryOwn) {
super(swigfaissJNI.IndexIVFScalarQuantizer_SWIGUpcast(cPtr), cMemoryOwn);
swigCPtr = cPtr;
}
protected static long getCPtr(IndexIVFScalarQuantizer obj) {
return (obj == null) ? 0 : obj.swigCPtr;
}
@SuppressWarnings("deprecation")
protected void finalize() {
delete();
}
public synchronized void delete() {
if (swigCPtr != 0) {
if (swigCMemOwn) {
swigCMemOwn = false;
swigfaissJNI.delete_IndexIVFScalarQuantizer(swigCPtr);
}
swigCPtr = 0;
}
super.delete();
}
public void setSq(SWIGTYPE_p_ScalarQuantizer value) {
swigfaissJNI.IndexIVFScalarQuantizer_sq_set(swigCPtr, this, SWIGTYPE_p_ScalarQuantizer.getCPtr(value));
}
public SWIGTYPE_p_ScalarQuantizer getSq() {
return new SWIGTYPE_p_ScalarQuantizer(swigfaissJNI.IndexIVFScalarQuantizer_sq_get(swigCPtr, this), true);
}
public void setBy_residual(boolean value) {
swigfaissJNI.IndexIVFScalarQuantizer_by_residual_set(swigCPtr, this, value);
}
public boolean getBy_residual() {
return swigfaissJNI.IndexIVFScalarQuantizer_by_residual_get(swigCPtr, this);
}
public IndexIVFScalarQuantizer(Index quantizer, long d, long nlist, SWIGTYPE_p_ScalarQuantizer__QuantizerType qtype, MetricType metric, boolean encode_residual) {
this(swigfaissJNI.new_IndexIVFScalarQuantizer__SWIG_0(Index.getCPtr(quantizer), quantizer, d, nlist, SWIGTYPE_p_ScalarQuantizer__QuantizerType.getCPtr(qtype), metric.swigValue(), encode_residual), true);
}
public IndexIVFScalarQuantizer(Index quantizer, long d, long nlist, SWIGTYPE_p_ScalarQuantizer__QuantizerType qtype, MetricType metric) {
this(swigfaissJNI.new_IndexIVFScalarQuantizer__SWIG_1(Index.getCPtr(quantizer), quantizer, d, nlist, SWIGTYPE_p_ScalarQuantizer__QuantizerType.getCPtr(qtype), metric.swigValue()), true);
}
public IndexIVFScalarQuantizer(Index quantizer, long d, long nlist, SWIGTYPE_p_ScalarQuantizer__QuantizerType qtype) {
this(swigfaissJNI.new_IndexIVFScalarQuantizer__SWIG_2(Index.getCPtr(quantizer), quantizer, d, nlist, SWIGTYPE_p_ScalarQuantizer__QuantizerType.getCPtr(qtype)), true);
}
public IndexIVFScalarQuantizer() {
this(swigfaissJNI.new_IndexIVFScalarQuantizer__SWIG_3(), true);
}
public void train_residual(long n, SWIGTYPE_p_float x) {
swigfaissJNI.IndexIVFScalarQuantizer_train_residual(swigCPtr, this, n, SWIGTYPE_p_float.getCPtr(x));
}
public void encode_vectors(long n, SWIGTYPE_p_float x, LongVector list_nos, SWIGTYPE_p_unsigned_char codes, boolean include_listnos) {
swigfaissJNI.IndexIVFScalarQuantizer_encode_vectors__SWIG_0(swigCPtr, this, n, SWIGTYPE_p_float.getCPtr(x), SWIGTYPE_p_long_long.getCPtr(list_nos.data()), list_nos, SWIGTYPE_p_unsigned_char.getCPtr(codes), include_listnos);
}
public void encode_vectors(long n, SWIGTYPE_p_float x, LongVector list_nos, SWIGTYPE_p_unsigned_char codes) {
swigfaissJNI.IndexIVFScalarQuantizer_encode_vectors__SWIG_1(swigCPtr, this, n, SWIGTYPE_p_float.getCPtr(x), SWIGTYPE_p_long_long.getCPtr(list_nos.data()), list_nos, SWIGTYPE_p_unsigned_char.getCPtr(codes));
}
public void add_core(long n, SWIGTYPE_p_float x, LongVector xids, LongVector precomputed_idx) {
swigfaissJNI.IndexIVFScalarQuantizer_add_core(swigCPtr, this, n, SWIGTYPE_p_float.getCPtr(x), SWIGTYPE_p_long_long.getCPtr(xids.data()), xids, SWIGTYPE_p_long_long.getCPtr(precomputed_idx.data()), precomputed_idx);
}
public SWIGTYPE_p_faiss__InvertedListScanner get_InvertedListScanner(boolean store_pairs) {
long cPtr = swigfaissJNI.IndexIVFScalarQuantizer_get_InvertedListScanner(swigCPtr, this, store_pairs);
return (cPtr == 0) ? null : new SWIGTYPE_p_faiss__InvertedListScanner(cPtr, false);
}
public void reconstruct_from_offset(long list_no, long offset, SWIGTYPE_p_float recons) {
swigfaissJNI.IndexIVFScalarQuantizer_reconstruct_from_offset(swigCPtr, this, list_no, offset, SWIGTYPE_p_float.getCPtr(recons));
}
public void sa_decode(long n, SWIGTYPE_p_unsigned_char bytes, SWIGTYPE_p_float x) {
swigfaissJNI.IndexIVFScalarQuantizer_sa_decode(swigCPtr, this, n, SWIGTYPE_p_unsigned_char.getCPtr(bytes), SWIGTYPE_p_float.getCPtr(x));
}
}

View File

@ -1,99 +0,0 @@
/* ----------------------------------------------------------------------------
* This file was automatically generated by SWIG (http://www.swig.org).
* Version 4.0.2
*
* Do not make changes to this file unless you know what you are doing--modify
* the SWIG interface file instead.
* ----------------------------------------------------------------------------- */
package com.twitter.ann.faiss;
public class IndexIVFStats {
private transient long swigCPtr;
protected transient boolean swigCMemOwn;
protected IndexIVFStats(long cPtr, boolean cMemoryOwn) {
swigCMemOwn = cMemoryOwn;
swigCPtr = cPtr;
}
protected static long getCPtr(IndexIVFStats obj) {
return (obj == null) ? 0 : obj.swigCPtr;
}
@SuppressWarnings("deprecation")
protected void finalize() {
delete();
}
public synchronized void delete() {
if (swigCPtr != 0) {
if (swigCMemOwn) {
swigCMemOwn = false;
swigfaissJNI.delete_IndexIVFStats(swigCPtr);
}
swigCPtr = 0;
}
}
public void setNq(long value) {
swigfaissJNI.IndexIVFStats_nq_set(swigCPtr, this, value);
}
public long getNq() {
return swigfaissJNI.IndexIVFStats_nq_get(swigCPtr, this);
}
public void setNlist(long value) {
swigfaissJNI.IndexIVFStats_nlist_set(swigCPtr, this, value);
}
public long getNlist() {
return swigfaissJNI.IndexIVFStats_nlist_get(swigCPtr, this);
}
public void setNdis(long value) {
swigfaissJNI.IndexIVFStats_ndis_set(swigCPtr, this, value);
}
public long getNdis() {
return swigfaissJNI.IndexIVFStats_ndis_get(swigCPtr, this);
}
public void setNheap_updates(long value) {
swigfaissJNI.IndexIVFStats_nheap_updates_set(swigCPtr, this, value);
}
public long getNheap_updates() {
return swigfaissJNI.IndexIVFStats_nheap_updates_get(swigCPtr, this);
}
public void setQuantization_time(double value) {
swigfaissJNI.IndexIVFStats_quantization_time_set(swigCPtr, this, value);
}
public double getQuantization_time() {
return swigfaissJNI.IndexIVFStats_quantization_time_get(swigCPtr, this);
}
public void setSearch_time(double value) {
swigfaissJNI.IndexIVFStats_search_time_set(swigCPtr, this, value);
}
public double getSearch_time() {
return swigfaissJNI.IndexIVFStats_search_time_get(swigCPtr, this);
}
public IndexIVFStats() {
this(swigfaissJNI.new_IndexIVFStats(), true);
}
public void reset() {
swigfaissJNI.IndexIVFStats_reset(swigCPtr, this);
}
public void add(IndexIVFStats other) {
swigfaissJNI.IndexIVFStats_add(swigCPtr, this, IndexIVFStats.getCPtr(other), other);
}
}

View File

@ -1,122 +0,0 @@
/* ----------------------------------------------------------------------------
* This file was automatically generated by SWIG (http://www.swig.org).
* Version 4.0.2
*
* Do not make changes to this file unless you know what you are doing--modify
* the SWIG interface file instead.
* ----------------------------------------------------------------------------- */
package com.twitter.ann.faiss;
public class IndexLSH extends IndexFlatCodes {
private transient long swigCPtr;
protected IndexLSH(long cPtr, boolean cMemoryOwn) {
super(swigfaissJNI.IndexLSH_SWIGUpcast(cPtr), cMemoryOwn);
swigCPtr = cPtr;
}
protected static long getCPtr(IndexLSH obj) {
return (obj == null) ? 0 : obj.swigCPtr;
}
@SuppressWarnings("deprecation")
protected void finalize() {
delete();
}
public synchronized void delete() {
if (swigCPtr != 0) {
if (swigCMemOwn) {
swigCMemOwn = false;
swigfaissJNI.delete_IndexLSH(swigCPtr);
}
swigCPtr = 0;
}
super.delete();
}
public void setNbits(int value) {
swigfaissJNI.IndexLSH_nbits_set(swigCPtr, this, value);
}
public int getNbits() {
return swigfaissJNI.IndexLSH_nbits_get(swigCPtr, this);
}
public void setRotate_data(boolean value) {
swigfaissJNI.IndexLSH_rotate_data_set(swigCPtr, this, value);
}
public boolean getRotate_data() {
return swigfaissJNI.IndexLSH_rotate_data_get(swigCPtr, this);
}
public void setTrain_thresholds(boolean value) {
swigfaissJNI.IndexLSH_train_thresholds_set(swigCPtr, this, value);
}
public boolean getTrain_thresholds() {
return swigfaissJNI.IndexLSH_train_thresholds_get(swigCPtr, this);
}
public void setRrot(RandomRotationMatrix value) {
swigfaissJNI.IndexLSH_rrot_set(swigCPtr, this, RandomRotationMatrix.getCPtr(value), value);
}
public RandomRotationMatrix getRrot() {
long cPtr = swigfaissJNI.IndexLSH_rrot_get(swigCPtr, this);
return (cPtr == 0) ? null : new RandomRotationMatrix(cPtr, false);
}
public void setThresholds(FloatVector value) {
swigfaissJNI.IndexLSH_thresholds_set(swigCPtr, this, FloatVector.getCPtr(value), value);
}
public FloatVector getThresholds() {
long cPtr = swigfaissJNI.IndexLSH_thresholds_get(swigCPtr, this);
return (cPtr == 0) ? null : new FloatVector(cPtr, false);
}
public IndexLSH(long d, int nbits, boolean rotate_data, boolean train_thresholds) {
this(swigfaissJNI.new_IndexLSH__SWIG_0(d, nbits, rotate_data, train_thresholds), true);
}
public IndexLSH(long d, int nbits, boolean rotate_data) {
this(swigfaissJNI.new_IndexLSH__SWIG_1(d, nbits, rotate_data), true);
}
public IndexLSH(long d, int nbits) {
this(swigfaissJNI.new_IndexLSH__SWIG_2(d, nbits), true);
}
public SWIGTYPE_p_float apply_preprocess(long n, SWIGTYPE_p_float x) {
long cPtr = swigfaissJNI.IndexLSH_apply_preprocess(swigCPtr, this, n, SWIGTYPE_p_float.getCPtr(x));
return (cPtr == 0) ? null : new SWIGTYPE_p_float(cPtr, false);
}
public void train(long n, SWIGTYPE_p_float x) {
swigfaissJNI.IndexLSH_train(swigCPtr, this, n, SWIGTYPE_p_float.getCPtr(x));
}
public void search(long n, SWIGTYPE_p_float x, long k, SWIGTYPE_p_float distances, LongVector labels) {
swigfaissJNI.IndexLSH_search(swigCPtr, this, n, SWIGTYPE_p_float.getCPtr(x), k, SWIGTYPE_p_float.getCPtr(distances), SWIGTYPE_p_long_long.getCPtr(labels.data()), labels);
}
public void transfer_thresholds(LinearTransform vt) {
swigfaissJNI.IndexLSH_transfer_thresholds(swigCPtr, this, LinearTransform.getCPtr(vt), vt);
}
public IndexLSH() {
this(swigfaissJNI.new_IndexLSH__SWIG_3(), true);
}
public void sa_encode(long n, SWIGTYPE_p_float x, SWIGTYPE_p_unsigned_char bytes) {
swigfaissJNI.IndexLSH_sa_encode(swigCPtr, this, n, SWIGTYPE_p_float.getCPtr(x), SWIGTYPE_p_unsigned_char.getCPtr(bytes));
}
public void sa_decode(long n, SWIGTYPE_p_unsigned_char bytes, SWIGTYPE_p_float x) {
swigfaissJNI.IndexLSH_sa_decode(swigCPtr, this, n, SWIGTYPE_p_unsigned_char.getCPtr(bytes), SWIGTYPE_p_float.getCPtr(x));
}
}

View File

@ -1,182 +0,0 @@
/* ----------------------------------------------------------------------------
* This file was automatically generated by SWIG (http://www.swig.org).
* Version 4.0.2
*
* Do not make changes to this file unless you know what you are doing--modify
* the SWIG interface file instead.
* ----------------------------------------------------------------------------- */
package com.twitter.ann.faiss;
public class IndexPQ extends IndexFlatCodes {
private transient long swigCPtr;
protected IndexPQ(long cPtr, boolean cMemoryOwn) {
super(swigfaissJNI.IndexPQ_SWIGUpcast(cPtr), cMemoryOwn);
swigCPtr = cPtr;
}
protected static long getCPtr(IndexPQ obj) {
return (obj == null) ? 0 : obj.swigCPtr;
}
@SuppressWarnings("deprecation")
protected void finalize() {
delete();
}
public synchronized void delete() {
if (swigCPtr != 0) {
if (swigCMemOwn) {
swigCMemOwn = false;
swigfaissJNI.delete_IndexPQ(swigCPtr);
}
swigCPtr = 0;
}
super.delete();
}
public void setPq(ProductQuantizer value) {
swigfaissJNI.IndexPQ_pq_set(swigCPtr, this, ProductQuantizer.getCPtr(value), value);
}
public ProductQuantizer getPq() {
long cPtr = swigfaissJNI.IndexPQ_pq_get(swigCPtr, this);
return (cPtr == 0) ? null : new ProductQuantizer(cPtr, false);
}
public IndexPQ(int d, long M, long nbits, MetricType metric) {
this(swigfaissJNI.new_IndexPQ__SWIG_0(d, M, nbits, metric.swigValue()), true);
}
public IndexPQ(int d, long M, long nbits) {
this(swigfaissJNI.new_IndexPQ__SWIG_1(d, M, nbits), true);
}
public IndexPQ() {
this(swigfaissJNI.new_IndexPQ__SWIG_2(), true);
}
public void train(long n, SWIGTYPE_p_float x) {
swigfaissJNI.IndexPQ_train(swigCPtr, this, n, SWIGTYPE_p_float.getCPtr(x));
}
public void search(long n, SWIGTYPE_p_float x, long k, SWIGTYPE_p_float distances, LongVector labels) {
swigfaissJNI.IndexPQ_search(swigCPtr, this, n, SWIGTYPE_p_float.getCPtr(x), k, SWIGTYPE_p_float.getCPtr(distances), SWIGTYPE_p_long_long.getCPtr(labels.data()), labels);
}
public void sa_encode(long n, SWIGTYPE_p_float x, SWIGTYPE_p_unsigned_char bytes) {
swigfaissJNI.IndexPQ_sa_encode(swigCPtr, this, n, SWIGTYPE_p_float.getCPtr(x), SWIGTYPE_p_unsigned_char.getCPtr(bytes));
}
public void sa_decode(long n, SWIGTYPE_p_unsigned_char bytes, SWIGTYPE_p_float x) {
swigfaissJNI.IndexPQ_sa_decode(swigCPtr, this, n, SWIGTYPE_p_unsigned_char.getCPtr(bytes), SWIGTYPE_p_float.getCPtr(x));
}
public DistanceComputer get_distance_computer() {
long cPtr = swigfaissJNI.IndexPQ_get_distance_computer(swigCPtr, this);
return (cPtr == 0) ? null : new DistanceComputer(cPtr, false);
}
public void setDo_polysemous_training(boolean value) {
swigfaissJNI.IndexPQ_do_polysemous_training_set(swigCPtr, this, value);
}
public boolean getDo_polysemous_training() {
return swigfaissJNI.IndexPQ_do_polysemous_training_get(swigCPtr, this);
}
public void setPolysemous_training(PolysemousTraining value) {
swigfaissJNI.IndexPQ_polysemous_training_set(swigCPtr, this, PolysemousTraining.getCPtr(value), value);
}
public PolysemousTraining getPolysemous_training() {
long cPtr = swigfaissJNI.IndexPQ_polysemous_training_get(swigCPtr, this);
return (cPtr == 0) ? null : new PolysemousTraining(cPtr, false);
}
public void setSearch_type(IndexPQ.Search_type_t value) {
swigfaissJNI.IndexPQ_search_type_set(swigCPtr, this, value.swigValue());
}
public IndexPQ.Search_type_t getSearch_type() {
return IndexPQ.Search_type_t.swigToEnum(swigfaissJNI.IndexPQ_search_type_get(swigCPtr, this));
}
public void setEncode_signs(boolean value) {
swigfaissJNI.IndexPQ_encode_signs_set(swigCPtr, this, value);
}
public boolean getEncode_signs() {
return swigfaissJNI.IndexPQ_encode_signs_get(swigCPtr, this);
}
public void setPolysemous_ht(int value) {
swigfaissJNI.IndexPQ_polysemous_ht_set(swigCPtr, this, value);
}
public int getPolysemous_ht() {
return swigfaissJNI.IndexPQ_polysemous_ht_get(swigCPtr, this);
}
public void search_core_polysemous(long n, SWIGTYPE_p_float x, long k, SWIGTYPE_p_float distances, LongVector labels) {
swigfaissJNI.IndexPQ_search_core_polysemous(swigCPtr, this, n, SWIGTYPE_p_float.getCPtr(x), k, SWIGTYPE_p_float.getCPtr(distances), SWIGTYPE_p_long_long.getCPtr(labels.data()), labels);
}
public void hamming_distance_histogram(long n, SWIGTYPE_p_float x, long nb, SWIGTYPE_p_float xb, LongVector dist_histogram) {
swigfaissJNI.IndexPQ_hamming_distance_histogram(swigCPtr, this, n, SWIGTYPE_p_float.getCPtr(x), nb, SWIGTYPE_p_float.getCPtr(xb), SWIGTYPE_p_long_long.getCPtr(dist_histogram.data()), dist_histogram);
}
public void hamming_distance_table(long n, SWIGTYPE_p_float x, SWIGTYPE_p_int dis) {
swigfaissJNI.IndexPQ_hamming_distance_table(swigCPtr, this, n, SWIGTYPE_p_float.getCPtr(x), SWIGTYPE_p_int.getCPtr(dis));
}
public final static class Search_type_t {
public final static IndexPQ.Search_type_t ST_PQ = new IndexPQ.Search_type_t("ST_PQ");
public final static IndexPQ.Search_type_t ST_HE = new IndexPQ.Search_type_t("ST_HE");
public final static IndexPQ.Search_type_t ST_generalized_HE = new IndexPQ.Search_type_t("ST_generalized_HE");
public final static IndexPQ.Search_type_t ST_SDC = new IndexPQ.Search_type_t("ST_SDC");
public final static IndexPQ.Search_type_t ST_polysemous = new IndexPQ.Search_type_t("ST_polysemous");
public final static IndexPQ.Search_type_t ST_polysemous_generalize = new IndexPQ.Search_type_t("ST_polysemous_generalize");
public final int swigValue() {
return swigValue;
}
public String toString() {
return swigName;
}
public static Search_type_t swigToEnum(int swigValue) {
if (swigValue < swigValues.length && swigValue >= 0 && swigValues[swigValue].swigValue == swigValue)
return swigValues[swigValue];
for (int i = 0; i < swigValues.length; i++)
if (swigValues[i].swigValue == swigValue)
return swigValues[i];
throw new IllegalArgumentException("No enum " + Search_type_t.class + " with value " + swigValue);
}
private Search_type_t(String swigName) {
this.swigName = swigName;
this.swigValue = swigNext++;
}
private Search_type_t(String swigName, int swigValue) {
this.swigName = swigName;
this.swigValue = swigValue;
swigNext = swigValue+1;
}
private Search_type_t(String swigName, Search_type_t swigEnum) {
this.swigName = swigName;
this.swigValue = swigEnum.swigValue;
swigNext = this.swigValue+1;
}
private static Search_type_t[] swigValues = { ST_PQ, ST_HE, ST_generalized_HE, ST_SDC, ST_polysemous, ST_polysemous_generalize };
private static int swigNext = 0;
private final int swigValue;
private final String swigName;
}
}

View File

@ -1,71 +0,0 @@
/* ----------------------------------------------------------------------------
* This file was automatically generated by SWIG (http://www.swig.org).
* Version 4.0.2
*
* Do not make changes to this file unless you know what you are doing--modify
* the SWIG interface file instead.
* ----------------------------------------------------------------------------- */
package com.twitter.ann.faiss;
public class IndexPQStats {
private transient long swigCPtr;
protected transient boolean swigCMemOwn;
protected IndexPQStats(long cPtr, boolean cMemoryOwn) {
swigCMemOwn = cMemoryOwn;
swigCPtr = cPtr;
}
protected static long getCPtr(IndexPQStats obj) {
return (obj == null) ? 0 : obj.swigCPtr;
}
@SuppressWarnings("deprecation")
protected void finalize() {
delete();
}
public synchronized void delete() {
if (swigCPtr != 0) {
if (swigCMemOwn) {
swigCMemOwn = false;
swigfaissJNI.delete_IndexPQStats(swigCPtr);
}
swigCPtr = 0;
}
}
public void setNq(long value) {
swigfaissJNI.IndexPQStats_nq_set(swigCPtr, this, value);
}
public long getNq() {
return swigfaissJNI.IndexPQStats_nq_get(swigCPtr, this);
}
public void setNcode(long value) {
swigfaissJNI.IndexPQStats_ncode_set(swigCPtr, this, value);
}
public long getNcode() {
return swigfaissJNI.IndexPQStats_ncode_get(swigCPtr, this);
}
public void setN_hamming_pass(long value) {
swigfaissJNI.IndexPQStats_n_hamming_pass_set(swigCPtr, this, value);
}
public long getN_hamming_pass() {
return swigfaissJNI.IndexPQStats_n_hamming_pass_get(swigCPtr, this);
}
public IndexPQStats() {
this(swigfaissJNI.new_IndexPQStats(), true);
}
public void reset() {
swigfaissJNI.IndexPQStats_reset(swigCPtr, this);
}
}

View File

@ -1,121 +0,0 @@
/* ----------------------------------------------------------------------------
* This file was automatically generated by SWIG (http://www.swig.org).
* Version 4.0.2
*
* Do not make changes to this file unless you know what you are doing--modify
* the SWIG interface file instead.
* ----------------------------------------------------------------------------- */
package com.twitter.ann.faiss;
public class IndexRefine extends Index {
private transient long swigCPtr;
protected IndexRefine(long cPtr, boolean cMemoryOwn) {
super(swigfaissJNI.IndexRefine_SWIGUpcast(cPtr), cMemoryOwn);
swigCPtr = cPtr;
}
protected static long getCPtr(IndexRefine obj) {
return (obj == null) ? 0 : obj.swigCPtr;
}
@SuppressWarnings("deprecation")
protected void finalize() {
delete();
}
public synchronized void delete() {
if (swigCPtr != 0) {
if (swigCMemOwn) {
swigCMemOwn = false;
swigfaissJNI.delete_IndexRefine(swigCPtr);
}
swigCPtr = 0;
}
super.delete();
}
public void setBase_index(Index value) {
swigfaissJNI.IndexRefine_base_index_set(swigCPtr, this, Index.getCPtr(value), value);
}
public Index getBase_index() {
long cPtr = swigfaissJNI.IndexRefine_base_index_get(swigCPtr, this);
return (cPtr == 0) ? null : new Index(cPtr, false);
}
public void setRefine_index(Index value) {
swigfaissJNI.IndexRefine_refine_index_set(swigCPtr, this, Index.getCPtr(value), value);
}
public Index getRefine_index() {
long cPtr = swigfaissJNI.IndexRefine_refine_index_get(swigCPtr, this);
return (cPtr == 0) ? null : new Index(cPtr, false);
}
public void setOwn_fields(boolean value) {
swigfaissJNI.IndexRefine_own_fields_set(swigCPtr, this, value);
}
public boolean getOwn_fields() {
return swigfaissJNI.IndexRefine_own_fields_get(swigCPtr, this);
}
public void setOwn_refine_index(boolean value) {
swigfaissJNI.IndexRefine_own_refine_index_set(swigCPtr, this, value);
}
public boolean getOwn_refine_index() {
return swigfaissJNI.IndexRefine_own_refine_index_get(swigCPtr, this);
}
public void setK_factor(float value) {
swigfaissJNI.IndexRefine_k_factor_set(swigCPtr, this, value);
}
public float getK_factor() {
return swigfaissJNI.IndexRefine_k_factor_get(swigCPtr, this);
}
public IndexRefine(Index base_index, Index refine_index) {
this(swigfaissJNI.new_IndexRefine__SWIG_0(Index.getCPtr(base_index), base_index, Index.getCPtr(refine_index), refine_index), true);
}
public IndexRefine() {
this(swigfaissJNI.new_IndexRefine__SWIG_1(), true);
}
public void train(long n, SWIGTYPE_p_float x) {
swigfaissJNI.IndexRefine_train(swigCPtr, this, n, SWIGTYPE_p_float.getCPtr(x));
}
public void add(long n, SWIGTYPE_p_float x) {
swigfaissJNI.IndexRefine_add(swigCPtr, this, n, SWIGTYPE_p_float.getCPtr(x));
}
public void reset() {
swigfaissJNI.IndexRefine_reset(swigCPtr, this);
}
public void search(long n, SWIGTYPE_p_float x, long k, SWIGTYPE_p_float distances, LongVector labels) {
swigfaissJNI.IndexRefine_search(swigCPtr, this, n, SWIGTYPE_p_float.getCPtr(x), k, SWIGTYPE_p_float.getCPtr(distances), SWIGTYPE_p_long_long.getCPtr(labels.data()), labels);
}
public void reconstruct(long key, SWIGTYPE_p_float recons) {
swigfaissJNI.IndexRefine_reconstruct(swigCPtr, this, key, SWIGTYPE_p_float.getCPtr(recons));
}
public long sa_code_size() {
return swigfaissJNI.IndexRefine_sa_code_size(swigCPtr, this);
}
public void sa_encode(long n, SWIGTYPE_p_float x, SWIGTYPE_p_unsigned_char bytes) {
swigfaissJNI.IndexRefine_sa_encode(swigCPtr, this, n, SWIGTYPE_p_float.getCPtr(x), SWIGTYPE_p_unsigned_char.getCPtr(bytes));
}
public void sa_decode(long n, SWIGTYPE_p_unsigned_char bytes, SWIGTYPE_p_float x) {
swigfaissJNI.IndexRefine_sa_decode(swigCPtr, this, n, SWIGTYPE_p_unsigned_char.getCPtr(bytes), SWIGTYPE_p_float.getCPtr(x));
}
}

View File

@ -1,55 +0,0 @@
/* ----------------------------------------------------------------------------
* This file was automatically generated by SWIG (http://www.swig.org).
* Version 4.0.2
*
* Do not make changes to this file unless you know what you are doing--modify
* the SWIG interface file instead.
* ----------------------------------------------------------------------------- */
package com.twitter.ann.faiss;
public class IndexRefineFlat extends IndexRefine {
private transient long swigCPtr;
protected IndexRefineFlat(long cPtr, boolean cMemoryOwn) {
super(swigfaissJNI.IndexRefineFlat_SWIGUpcast(cPtr), cMemoryOwn);
swigCPtr = cPtr;
}
protected static long getCPtr(IndexRefineFlat obj) {
return (obj == null) ? 0 : obj.swigCPtr;
}
@SuppressWarnings("deprecation")
protected void finalize() {
delete();
}
public synchronized void delete() {
if (swigCPtr != 0) {
if (swigCMemOwn) {
swigCMemOwn = false;
swigfaissJNI.delete_IndexRefineFlat(swigCPtr);
}
swigCPtr = 0;
}
super.delete();
}
public IndexRefineFlat(Index base_index) {
this(swigfaissJNI.new_IndexRefineFlat__SWIG_0(Index.getCPtr(base_index), base_index), true);
}
public IndexRefineFlat(Index base_index, SWIGTYPE_p_float xb) {
this(swigfaissJNI.new_IndexRefineFlat__SWIG_1(Index.getCPtr(base_index), base_index, SWIGTYPE_p_float.getCPtr(xb)), true);
}
public IndexRefineFlat() {
this(swigfaissJNI.new_IndexRefineFlat__SWIG_2(), true);
}
public void search(long n, SWIGTYPE_p_float x, long k, SWIGTYPE_p_float distances, LongVector labels) {
swigfaissJNI.IndexRefineFlat_search(swigCPtr, this, n, SWIGTYPE_p_float.getCPtr(x), k, SWIGTYPE_p_float.getCPtr(distances), SWIGTYPE_p_long_long.getCPtr(labels.data()), labels);
}
}

View File

@ -1,80 +0,0 @@
/* ----------------------------------------------------------------------------
* This file was automatically generated by SWIG (http://www.swig.org).
* Version 4.0.2
*
* Do not make changes to this file unless you know what you are doing--modify
* the SWIG interface file instead.
* ----------------------------------------------------------------------------- */
package com.twitter.ann.faiss;
public class IndexScalarQuantizer extends IndexFlatCodes {
private transient long swigCPtr;
protected IndexScalarQuantizer(long cPtr, boolean cMemoryOwn) {
super(swigfaissJNI.IndexScalarQuantizer_SWIGUpcast(cPtr), cMemoryOwn);
swigCPtr = cPtr;
}
protected static long getCPtr(IndexScalarQuantizer obj) {
return (obj == null) ? 0 : obj.swigCPtr;
}
@SuppressWarnings("deprecation")
protected void finalize() {
delete();
}
public synchronized void delete() {
if (swigCPtr != 0) {
if (swigCMemOwn) {
swigCMemOwn = false;
swigfaissJNI.delete_IndexScalarQuantizer(swigCPtr);
}
swigCPtr = 0;
}
super.delete();
}
public void setSq(SWIGTYPE_p_ScalarQuantizer value) {
swigfaissJNI.IndexScalarQuantizer_sq_set(swigCPtr, this, SWIGTYPE_p_ScalarQuantizer.getCPtr(value));
}
public SWIGTYPE_p_ScalarQuantizer getSq() {
return new SWIGTYPE_p_ScalarQuantizer(swigfaissJNI.IndexScalarQuantizer_sq_get(swigCPtr, this), true);
}
public IndexScalarQuantizer(int d, SWIGTYPE_p_ScalarQuantizer__QuantizerType qtype, MetricType metric) {
this(swigfaissJNI.new_IndexScalarQuantizer__SWIG_0(d, SWIGTYPE_p_ScalarQuantizer__QuantizerType.getCPtr(qtype), metric.swigValue()), true);
}
public IndexScalarQuantizer(int d, SWIGTYPE_p_ScalarQuantizer__QuantizerType qtype) {
this(swigfaissJNI.new_IndexScalarQuantizer__SWIG_1(d, SWIGTYPE_p_ScalarQuantizer__QuantizerType.getCPtr(qtype)), true);
}
public IndexScalarQuantizer() {
this(swigfaissJNI.new_IndexScalarQuantizer__SWIG_2(), true);
}
public void train(long n, SWIGTYPE_p_float x) {
swigfaissJNI.IndexScalarQuantizer_train(swigCPtr, this, n, SWIGTYPE_p_float.getCPtr(x));
}
public void search(long n, SWIGTYPE_p_float x, long k, SWIGTYPE_p_float distances, LongVector labels) {
swigfaissJNI.IndexScalarQuantizer_search(swigCPtr, this, n, SWIGTYPE_p_float.getCPtr(x), k, SWIGTYPE_p_float.getCPtr(distances), SWIGTYPE_p_long_long.getCPtr(labels.data()), labels);
}
public DistanceComputer get_distance_computer() {
long cPtr = swigfaissJNI.IndexScalarQuantizer_get_distance_computer(swigCPtr, this);
return (cPtr == 0) ? null : new DistanceComputer(cPtr, false);
}
public void sa_encode(long n, SWIGTYPE_p_float x, SWIGTYPE_p_unsigned_char bytes) {
swigfaissJNI.IndexScalarQuantizer_sa_encode(swigCPtr, this, n, SWIGTYPE_p_float.getCPtr(x), SWIGTYPE_p_unsigned_char.getCPtr(bytes));
}
public void sa_decode(long n, SWIGTYPE_p_unsigned_char bytes, SWIGTYPE_p_float x) {
swigfaissJNI.IndexScalarQuantizer_sa_decode(swigCPtr, this, n, SWIGTYPE_p_unsigned_char.getCPtr(bytes), SWIGTYPE_p_float.getCPtr(x));
}
}

View File

@ -1,99 +0,0 @@
/* ----------------------------------------------------------------------------
* This file was automatically generated by SWIG (http://www.swig.org).
* Version 4.0.2
*
* Do not make changes to this file unless you know what you are doing--modify
* the SWIG interface file instead.
* ----------------------------------------------------------------------------- */
package com.twitter.ann.faiss;
public class IndexShards {
private transient long swigCPtr;
protected transient boolean swigCMemOwn;
protected IndexShards(long cPtr, boolean cMemoryOwn) {
swigCMemOwn = cMemoryOwn;
swigCPtr = cPtr;
}
protected static long getCPtr(IndexShards obj) {
return (obj == null) ? 0 : obj.swigCPtr;
}
@SuppressWarnings("deprecation")
protected void finalize() {
delete();
}
public synchronized void delete() {
if (swigCPtr != 0) {
if (swigCMemOwn) {
swigCMemOwn = false;
swigfaissJNI.delete_IndexShards(swigCPtr);
}
swigCPtr = 0;
}
}
public IndexShards(boolean threaded, boolean successive_ids) {
this(swigfaissJNI.new_IndexShards__SWIG_0(threaded, successive_ids), true);
}
public IndexShards(boolean threaded) {
this(swigfaissJNI.new_IndexShards__SWIG_1(threaded), true);
}
public IndexShards() {
this(swigfaissJNI.new_IndexShards__SWIG_2(), true);
}
public IndexShards(int d, boolean threaded, boolean successive_ids) {
this(swigfaissJNI.new_IndexShards__SWIG_3(d, threaded, successive_ids), true);
}
public IndexShards(int d, boolean threaded) {
this(swigfaissJNI.new_IndexShards__SWIG_4(d, threaded), true);
}
public IndexShards(int d) {
this(swigfaissJNI.new_IndexShards__SWIG_5(d), true);
}
public void add_shard(Index index) {
swigfaissJNI.IndexShards_add_shard(swigCPtr, this, Index.getCPtr(index), index);
}
public void remove_shard(Index index) {
swigfaissJNI.IndexShards_remove_shard(swigCPtr, this, Index.getCPtr(index), index);
}
public void add(long n, SWIGTYPE_p_float x) {
swigfaissJNI.IndexShards_add(swigCPtr, this, n, SWIGTYPE_p_float.getCPtr(x));
}
public void add_with_ids(long n, SWIGTYPE_p_float x, LongVector xids) {
swigfaissJNI.IndexShards_add_with_ids(swigCPtr, this, n, SWIGTYPE_p_float.getCPtr(x), SWIGTYPE_p_long_long.getCPtr(xids.data()), xids);
}
public void search(long n, SWIGTYPE_p_float x, long k, SWIGTYPE_p_float distances, LongVector labels) {
swigfaissJNI.IndexShards_search(swigCPtr, this, n, SWIGTYPE_p_float.getCPtr(x), k, SWIGTYPE_p_float.getCPtr(distances), SWIGTYPE_p_long_long.getCPtr(labels.data()), labels);
}
public void train(long n, SWIGTYPE_p_float x) {
swigfaissJNI.IndexShards_train(swigCPtr, this, n, SWIGTYPE_p_float.getCPtr(x));
}
public void setSuccessive_ids(boolean value) {
swigfaissJNI.IndexShards_successive_ids_set(swigCPtr, this, value);
}
public boolean getSuccessive_ids() {
return swigfaissJNI.IndexShards_successive_ids_get(swigCPtr, this);
}
public void syncWithSubIndexes() {
swigfaissJNI.IndexShards_syncWithSubIndexes(swigCPtr, this);
}
}

View File

@ -1,96 +0,0 @@
/* ----------------------------------------------------------------------------
* This file was automatically generated by SWIG (http://www.swig.org).
* Version 4.0.2
*
* Do not make changes to this file unless you know what you are doing--modify
* the SWIG interface file instead.
* ----------------------------------------------------------------------------- */
package com.twitter.ann.faiss;
public class IndexSplitVectors extends Index {
private transient long swigCPtr;
protected IndexSplitVectors(long cPtr, boolean cMemoryOwn) {
super(swigfaissJNI.IndexSplitVectors_SWIGUpcast(cPtr), cMemoryOwn);
swigCPtr = cPtr;
}
protected static long getCPtr(IndexSplitVectors obj) {
return (obj == null) ? 0 : obj.swigCPtr;
}
@SuppressWarnings("deprecation")
protected void finalize() {
delete();
}
public synchronized void delete() {
if (swigCPtr != 0) {
if (swigCMemOwn) {
swigCMemOwn = false;
swigfaissJNI.delete_IndexSplitVectors(swigCPtr);
}
swigCPtr = 0;
}
super.delete();
}
public void setOwn_fields(boolean value) {
swigfaissJNI.IndexSplitVectors_own_fields_set(swigCPtr, this, value);
}
public boolean getOwn_fields() {
return swigfaissJNI.IndexSplitVectors_own_fields_get(swigCPtr, this);
}
public void setThreaded(boolean value) {
swigfaissJNI.IndexSplitVectors_threaded_set(swigCPtr, this, value);
}
public boolean getThreaded() {
return swigfaissJNI.IndexSplitVectors_threaded_get(swigCPtr, this);
}
public void setSub_indexes(SWIGTYPE_p_std__vectorT_faiss__Index_p_t value) {
swigfaissJNI.IndexSplitVectors_sub_indexes_set(swigCPtr, this, SWIGTYPE_p_std__vectorT_faiss__Index_p_t.getCPtr(value));
}
public SWIGTYPE_p_std__vectorT_faiss__Index_p_t getSub_indexes() {
long cPtr = swigfaissJNI.IndexSplitVectors_sub_indexes_get(swigCPtr, this);
return (cPtr == 0) ? null : new SWIGTYPE_p_std__vectorT_faiss__Index_p_t(cPtr, false);
}
public void setSum_d(long value) {
swigfaissJNI.IndexSplitVectors_sum_d_set(swigCPtr, this, value);
}
public long getSum_d() {
return swigfaissJNI.IndexSplitVectors_sum_d_get(swigCPtr, this);
}
public void add_sub_index(Index arg0) {
swigfaissJNI.IndexSplitVectors_add_sub_index(swigCPtr, this, Index.getCPtr(arg0), arg0);
}
public void sync_with_sub_indexes() {
swigfaissJNI.IndexSplitVectors_sync_with_sub_indexes(swigCPtr, this);
}
public void add(long n, SWIGTYPE_p_float x) {
swigfaissJNI.IndexSplitVectors_add(swigCPtr, this, n, SWIGTYPE_p_float.getCPtr(x));
}
public void search(long n, SWIGTYPE_p_float x, long k, SWIGTYPE_p_float distances, LongVector labels) {
swigfaissJNI.IndexSplitVectors_search(swigCPtr, this, n, SWIGTYPE_p_float.getCPtr(x), k, SWIGTYPE_p_float.getCPtr(distances), SWIGTYPE_p_long_long.getCPtr(labels.data()), labels);
}
public void train(long n, SWIGTYPE_p_float x) {
swigfaissJNI.IndexSplitVectors_train(swigCPtr, this, n, SWIGTYPE_p_float.getCPtr(x));
}
public void reset() {
swigfaissJNI.IndexSplitVectors_reset(swigCPtr, this);
}
}

View File

@ -1,76 +0,0 @@
/* ----------------------------------------------------------------------------
* This file was automatically generated by SWIG (http://www.swig.org).
* Version 4.0.2
*
* Do not make changes to this file unless you know what you are doing--modify
* the SWIG interface file instead.
* ----------------------------------------------------------------------------- */
package com.twitter.ann.faiss;
public class IntVector {
private transient long swigCPtr;
protected transient boolean swigCMemOwn;
protected IntVector(long cPtr, boolean cMemoryOwn) {
swigCMemOwn = cMemoryOwn;
swigCPtr = cPtr;
}
protected static long getCPtr(IntVector obj) {
return (obj == null) ? 0 : obj.swigCPtr;
}
@SuppressWarnings("deprecation")
protected void finalize() {
delete();
}
public synchronized void delete() {
if (swigCPtr != 0) {
if (swigCMemOwn) {
swigCMemOwn = false;
swigfaissJNI.delete_IntVector(swigCPtr);
}
swigCPtr = 0;
}
}
public IntVector() {
this(swigfaissJNI.new_IntVector(), true);
}
public void push_back(int arg0) {
swigfaissJNI.IntVector_push_back(swigCPtr, this, arg0);
}
public void clear() {
swigfaissJNI.IntVector_clear(swigCPtr, this);
}
public SWIGTYPE_p_int data() {
long cPtr = swigfaissJNI.IntVector_data(swigCPtr, this);
return (cPtr == 0) ? null : new SWIGTYPE_p_int(cPtr, false);
}
public long size() {
return swigfaissJNI.IntVector_size(swigCPtr, this);
}
public int at(long n) {
return swigfaissJNI.IntVector_at(swigCPtr, this, n);
}
public void resize(long n) {
swigfaissJNI.IntVector_resize(swigCPtr, this, n);
}
public void reserve(long n) {
swigfaissJNI.IntVector_reserve(swigCPtr, this, n);
}
public void swap(IntVector other) {
swigfaissJNI.IntVector_swap(swigCPtr, this, IntVector.getCPtr(other), other);
}
}

View File

@ -1,59 +0,0 @@
/* ----------------------------------------------------------------------------
* This file was automatically generated by SWIG (http://www.swig.org).
* Version 4.0.2
*
* Do not make changes to this file unless you know what you are doing--modify
* the SWIG interface file instead.
* ----------------------------------------------------------------------------- */
package com.twitter.ann.faiss;
public class InterruptCallback {
private transient long swigCPtr;
protected transient boolean swigCMemOwn;
protected InterruptCallback(long cPtr, boolean cMemoryOwn) {
swigCMemOwn = cMemoryOwn;
swigCPtr = cPtr;
}
protected static long getCPtr(InterruptCallback obj) {
return (obj == null) ? 0 : obj.swigCPtr;
}
@SuppressWarnings("deprecation")
protected void finalize() {
delete();
}
public synchronized void delete() {
if (swigCPtr != 0) {
if (swigCMemOwn) {
swigCMemOwn = false;
swigfaissJNI.delete_InterruptCallback(swigCPtr);
}
swigCPtr = 0;
}
}
public boolean want_interrupt() {
return swigfaissJNI.InterruptCallback_want_interrupt(swigCPtr, this);
}
public static void clear_instance() {
swigfaissJNI.InterruptCallback_clear_instance();
}
public static void check() {
swigfaissJNI.InterruptCallback_check();
}
public static boolean is_interrupted() {
return swigfaissJNI.InterruptCallback_is_interrupted();
}
public static long get_period_hint(long flops) {
return swigfaissJNI.InterruptCallback_get_period_hint(flops);
}
}

View File

@ -1,55 +0,0 @@
/* ----------------------------------------------------------------------------
* This file was automatically generated by SWIG (http://www.swig.org).
* Version 4.0.2
*
* Do not make changes to this file unless you know what you are doing--modify
* the SWIG interface file instead.
* ----------------------------------------------------------------------------- */
package com.twitter.ann.faiss;
public class IntersectionCriterion extends AutoTuneCriterion {
private transient long swigCPtr;
protected IntersectionCriterion(long cPtr, boolean cMemoryOwn) {
super(swigfaissJNI.IntersectionCriterion_SWIGUpcast(cPtr), cMemoryOwn);
swigCPtr = cPtr;
}
protected static long getCPtr(IntersectionCriterion obj) {
return (obj == null) ? 0 : obj.swigCPtr;
}
@SuppressWarnings("deprecation")
protected void finalize() {
delete();
}
public synchronized void delete() {
if (swigCPtr != 0) {
if (swigCMemOwn) {
swigCMemOwn = false;
swigfaissJNI.delete_IntersectionCriterion(swigCPtr);
}
swigCPtr = 0;
}
super.delete();
}
public void setR(long value) {
swigfaissJNI.IntersectionCriterion_R_set(swigCPtr, this, value);
}
public long getR() {
return swigfaissJNI.IntersectionCriterion_R_get(swigCPtr, this);
}
public IntersectionCriterion(long nq, long R) {
this(swigfaissJNI.new_IntersectionCriterion(nq, R), true);
}
public double evaluate(SWIGTYPE_p_float D, LongVector I) {
return swigfaissJNI.IntersectionCriterion_evaluate(swigCPtr, this, SWIGTYPE_p_float.getCPtr(D), SWIGTYPE_p_long_long.getCPtr(I.data()), I);
}
}

View File

@ -1,262 +0,0 @@
/* ----------------------------------------------------------------------------
* This file was automatically generated by SWIG (http://www.swig.org).
* Version 4.0.2
*
* Do not make changes to this file unless you know what you are doing--modify
* the SWIG interface file instead.
* ----------------------------------------------------------------------------- */
package com.twitter.ann.faiss;
public class InvertedLists {
private transient long swigCPtr;
protected transient boolean swigCMemOwn;
protected InvertedLists(long cPtr, boolean cMemoryOwn) {
swigCMemOwn = cMemoryOwn;
swigCPtr = cPtr;
}
protected static long getCPtr(InvertedLists obj) {
return (obj == null) ? 0 : obj.swigCPtr;
}
@SuppressWarnings("deprecation")
protected void finalize() {
delete();
}
public synchronized void delete() {
if (swigCPtr != 0) {
if (swigCMemOwn) {
swigCMemOwn = false;
swigfaissJNI.delete_InvertedLists(swigCPtr);
}
swigCPtr = 0;
}
}
public void setNlist(long value) {
swigfaissJNI.InvertedLists_nlist_set(swigCPtr, this, value);
}
public long getNlist() {
return swigfaissJNI.InvertedLists_nlist_get(swigCPtr, this);
}
public void setCode_size(long value) {
swigfaissJNI.InvertedLists_code_size_set(swigCPtr, this, value);
}
public long getCode_size() {
return swigfaissJNI.InvertedLists_code_size_get(swigCPtr, this);
}
public long list_size(long list_no) {
return swigfaissJNI.InvertedLists_list_size(swigCPtr, this, list_no);
}
public SWIGTYPE_p_unsigned_char get_codes(long list_no) {
long cPtr = swigfaissJNI.InvertedLists_get_codes(swigCPtr, this, list_no);
return (cPtr == 0) ? null : new SWIGTYPE_p_unsigned_char(cPtr, false);
}
public LongVector get_ids(long list_no) {
return new LongVector(swigfaissJNI.InvertedLists_get_ids(swigCPtr, this, list_no), false);
}
public void release_codes(long list_no, SWIGTYPE_p_unsigned_char codes) {
swigfaissJNI.InvertedLists_release_codes(swigCPtr, this, list_no, SWIGTYPE_p_unsigned_char.getCPtr(codes));
}
public void release_ids(long list_no, LongVector ids) {
swigfaissJNI.InvertedLists_release_ids(swigCPtr, this, list_no, SWIGTYPE_p_long_long.getCPtr(ids.data()), ids);
}
public long get_single_id(long list_no, long offset) {
return swigfaissJNI.InvertedLists_get_single_id(swigCPtr, this, list_no, offset);
}
public SWIGTYPE_p_unsigned_char get_single_code(long list_no, long offset) {
long cPtr = swigfaissJNI.InvertedLists_get_single_code(swigCPtr, this, list_no, offset);
return (cPtr == 0) ? null : new SWIGTYPE_p_unsigned_char(cPtr, false);
}
public void prefetch_lists(LongVector list_nos, int nlist) {
swigfaissJNI.InvertedLists_prefetch_lists(swigCPtr, this, SWIGTYPE_p_long_long.getCPtr(list_nos.data()), list_nos, nlist);
}
public long add_entry(long list_no, long theid, SWIGTYPE_p_unsigned_char code) {
return swigfaissJNI.InvertedLists_add_entry(swigCPtr, this, list_no, theid, SWIGTYPE_p_unsigned_char.getCPtr(code));
}
public long add_entries(long list_no, long n_entry, LongVector ids, SWIGTYPE_p_unsigned_char code) {
return swigfaissJNI.InvertedLists_add_entries(swigCPtr, this, list_no, n_entry, SWIGTYPE_p_long_long.getCPtr(ids.data()), ids, SWIGTYPE_p_unsigned_char.getCPtr(code));
}
public void update_entry(long list_no, long offset, long id, SWIGTYPE_p_unsigned_char code) {
swigfaissJNI.InvertedLists_update_entry(swigCPtr, this, list_no, offset, id, SWIGTYPE_p_unsigned_char.getCPtr(code));
}
public void update_entries(long list_no, long offset, long n_entry, LongVector ids, SWIGTYPE_p_unsigned_char code) {
swigfaissJNI.InvertedLists_update_entries(swigCPtr, this, list_no, offset, n_entry, SWIGTYPE_p_long_long.getCPtr(ids.data()), ids, SWIGTYPE_p_unsigned_char.getCPtr(code));
}
public void resize(long list_no, long new_size) {
swigfaissJNI.InvertedLists_resize(swigCPtr, this, list_no, new_size);
}
public void reset() {
swigfaissJNI.InvertedLists_reset(swigCPtr, this);
}
public void merge_from(InvertedLists oivf, long add_id) {
swigfaissJNI.InvertedLists_merge_from(swigCPtr, this, InvertedLists.getCPtr(oivf), oivf, add_id);
}
public double imbalance_factor() {
return swigfaissJNI.InvertedLists_imbalance_factor(swigCPtr, this);
}
public void print_stats() {
swigfaissJNI.InvertedLists_print_stats(swigCPtr, this);
}
public long compute_ntotal() {
return swigfaissJNI.InvertedLists_compute_ntotal(swigCPtr, this);
}
static public class ScopedIds {
private transient long swigCPtr;
protected transient boolean swigCMemOwn;
protected ScopedIds(long cPtr, boolean cMemoryOwn) {
swigCMemOwn = cMemoryOwn;
swigCPtr = cPtr;
}
protected static long getCPtr(ScopedIds obj) {
return (obj == null) ? 0 : obj.swigCPtr;
}
@SuppressWarnings("deprecation")
protected void finalize() {
delete();
}
public synchronized void delete() {
if (swigCPtr != 0) {
if (swigCMemOwn) {
swigCMemOwn = false;
swigfaissJNI.delete_InvertedLists_ScopedIds(swigCPtr);
}
swigCPtr = 0;
}
}
public void setIl(InvertedLists value) {
swigfaissJNI.InvertedLists_ScopedIds_il_set(swigCPtr, this, InvertedLists.getCPtr(value), value);
}
public InvertedLists getIl() {
long cPtr = swigfaissJNI.InvertedLists_ScopedIds_il_get(swigCPtr, this);
return (cPtr == 0) ? null : new InvertedLists(cPtr, false);
}
public void setIds(LongVector value) {
swigfaissJNI.InvertedLists_ScopedIds_ids_set(swigCPtr, this, SWIGTYPE_p_long_long.getCPtr(value.data()), value);
}
public LongVector getIds() {
return new LongVector(swigfaissJNI.InvertedLists_ScopedIds_ids_get(swigCPtr, this), false);
}
public void setList_no(long value) {
swigfaissJNI.InvertedLists_ScopedIds_list_no_set(swigCPtr, this, value);
}
public long getList_no() {
return swigfaissJNI.InvertedLists_ScopedIds_list_no_get(swigCPtr, this);
}
public ScopedIds(InvertedLists il, long list_no) {
this(swigfaissJNI.new_InvertedLists_ScopedIds(InvertedLists.getCPtr(il), il, list_no), true);
}
public LongVector get() {
return new LongVector(swigfaissJNI.InvertedLists_ScopedIds_get(swigCPtr, this), false);
}
}
static public class ScopedCodes {
private transient long swigCPtr;
protected transient boolean swigCMemOwn;
protected ScopedCodes(long cPtr, boolean cMemoryOwn) {
swigCMemOwn = cMemoryOwn;
swigCPtr = cPtr;
}
protected static long getCPtr(ScopedCodes obj) {
return (obj == null) ? 0 : obj.swigCPtr;
}
@SuppressWarnings("deprecation")
protected void finalize() {
delete();
}
public synchronized void delete() {
if (swigCPtr != 0) {
if (swigCMemOwn) {
swigCMemOwn = false;
swigfaissJNI.delete_InvertedLists_ScopedCodes(swigCPtr);
}
swigCPtr = 0;
}
}
public void setIl(InvertedLists value) {
swigfaissJNI.InvertedLists_ScopedCodes_il_set(swigCPtr, this, InvertedLists.getCPtr(value), value);
}
public InvertedLists getIl() {
long cPtr = swigfaissJNI.InvertedLists_ScopedCodes_il_get(swigCPtr, this);
return (cPtr == 0) ? null : new InvertedLists(cPtr, false);
}
public void setCodes(SWIGTYPE_p_unsigned_char value) {
swigfaissJNI.InvertedLists_ScopedCodes_codes_set(swigCPtr, this, SWIGTYPE_p_unsigned_char.getCPtr(value));
}
public SWIGTYPE_p_unsigned_char getCodes() {
long cPtr = swigfaissJNI.InvertedLists_ScopedCodes_codes_get(swigCPtr, this);
return (cPtr == 0) ? null : new SWIGTYPE_p_unsigned_char(cPtr, false);
}
public void setList_no(long value) {
swigfaissJNI.InvertedLists_ScopedCodes_list_no_set(swigCPtr, this, value);
}
public long getList_no() {
return swigfaissJNI.InvertedLists_ScopedCodes_list_no_get(swigCPtr, this);
}
public ScopedCodes(InvertedLists il, long list_no) {
this(swigfaissJNI.new_InvertedLists_ScopedCodes__SWIG_0(InvertedLists.getCPtr(il), il, list_no), true);
}
public ScopedCodes(InvertedLists il, long list_no, long offset) {
this(swigfaissJNI.new_InvertedLists_ScopedCodes__SWIG_1(InvertedLists.getCPtr(il), il, list_no, offset), true);
}
public SWIGTYPE_p_unsigned_char get() {
long cPtr = swigfaissJNI.InvertedLists_ScopedCodes_get(swigCPtr, this);
return (cPtr == 0) ? null : new SWIGTYPE_p_unsigned_char(cPtr, false);
}
}
public final static long INVALID_CODE_SIZE = swigfaissJNI.InvertedLists_INVALID_CODE_SIZE_get();
}

View File

@ -1,77 +0,0 @@
/* ----------------------------------------------------------------------------
* This file was automatically generated by SWIG (http://www.swig.org).
* Version 4.0.2
*
* Do not make changes to this file unless you know what you are doing--modify
* the SWIG interface file instead.
* ----------------------------------------------------------------------------- */
package com.twitter.ann.faiss;
public class InvertedListsPtrVector {
private transient long swigCPtr;
protected transient boolean swigCMemOwn;
protected InvertedListsPtrVector(long cPtr, boolean cMemoryOwn) {
swigCMemOwn = cMemoryOwn;
swigCPtr = cPtr;
}
protected static long getCPtr(InvertedListsPtrVector obj) {
return (obj == null) ? 0 : obj.swigCPtr;
}
@SuppressWarnings("deprecation")
protected void finalize() {
delete();
}
public synchronized void delete() {
if (swigCPtr != 0) {
if (swigCMemOwn) {
swigCMemOwn = false;
swigfaissJNI.delete_InvertedListsPtrVector(swigCPtr);
}
swigCPtr = 0;
}
}
public InvertedListsPtrVector() {
this(swigfaissJNI.new_InvertedListsPtrVector(), true);
}
public void push_back(InvertedLists arg0) {
swigfaissJNI.InvertedListsPtrVector_push_back(swigCPtr, this, InvertedLists.getCPtr(arg0), arg0);
}
public void clear() {
swigfaissJNI.InvertedListsPtrVector_clear(swigCPtr, this);
}
public SWIGTYPE_p_p_faiss__InvertedLists data() {
long cPtr = swigfaissJNI.InvertedListsPtrVector_data(swigCPtr, this);
return (cPtr == 0) ? null : new SWIGTYPE_p_p_faiss__InvertedLists(cPtr, false);
}
public long size() {
return swigfaissJNI.InvertedListsPtrVector_size(swigCPtr, this);
}
public InvertedLists at(long n) {
long cPtr = swigfaissJNI.InvertedListsPtrVector_at(swigCPtr, this, n);
return (cPtr == 0) ? null : new InvertedLists(cPtr, false);
}
public void resize(long n) {
swigfaissJNI.InvertedListsPtrVector_resize(swigCPtr, this, n);
}
public void reserve(long n) {
swigfaissJNI.InvertedListsPtrVector_reserve(swigCPtr, this, n);
}
public void swap(InvertedListsPtrVector other) {
swigfaissJNI.InvertedListsPtrVector_swap(swigCPtr, this, InvertedListsPtrVector.getCPtr(other), other);
}
}

View File

@ -1,114 +0,0 @@
/* ----------------------------------------------------------------------------
* This file was automatically generated by SWIG (http://www.swig.org).
* Version 4.0.2
*
* Do not make changes to this file unless you know what you are doing--modify
* the SWIG interface file instead.
* ----------------------------------------------------------------------------- */
package com.twitter.ann.faiss;
public class Level1Quantizer {
private transient long swigCPtr;
protected transient boolean swigCMemOwn;
protected Level1Quantizer(long cPtr, boolean cMemoryOwn) {
swigCMemOwn = cMemoryOwn;
swigCPtr = cPtr;
}
protected static long getCPtr(Level1Quantizer obj) {
return (obj == null) ? 0 : obj.swigCPtr;
}
@SuppressWarnings("deprecation")
protected void finalize() {
delete();
}
public synchronized void delete() {
if (swigCPtr != 0) {
if (swigCMemOwn) {
swigCMemOwn = false;
swigfaissJNI.delete_Level1Quantizer(swigCPtr);
}
swigCPtr = 0;
}
}
public void setQuantizer(Index value) {
swigfaissJNI.Level1Quantizer_quantizer_set(swigCPtr, this, Index.getCPtr(value), value);
}
public Index getQuantizer() {
long cPtr = swigfaissJNI.Level1Quantizer_quantizer_get(swigCPtr, this);
return (cPtr == 0) ? null : new Index(cPtr, false);
}
public void setNlist(long value) {
swigfaissJNI.Level1Quantizer_nlist_set(swigCPtr, this, value);
}
public long getNlist() {
return swigfaissJNI.Level1Quantizer_nlist_get(swigCPtr, this);
}
public void setQuantizer_trains_alone(char value) {
swigfaissJNI.Level1Quantizer_quantizer_trains_alone_set(swigCPtr, this, value);
}
public char getQuantizer_trains_alone() {
return swigfaissJNI.Level1Quantizer_quantizer_trains_alone_get(swigCPtr, this);
}
public void setOwn_fields(boolean value) {
swigfaissJNI.Level1Quantizer_own_fields_set(swigCPtr, this, value);
}
public boolean getOwn_fields() {
return swigfaissJNI.Level1Quantizer_own_fields_get(swigCPtr, this);
}
public void setCp(ClusteringParameters value) {
swigfaissJNI.Level1Quantizer_cp_set(swigCPtr, this, ClusteringParameters.getCPtr(value), value);
}
public ClusteringParameters getCp() {
long cPtr = swigfaissJNI.Level1Quantizer_cp_get(swigCPtr, this);
return (cPtr == 0) ? null : new ClusteringParameters(cPtr, false);
}
public void setClustering_index(Index value) {
swigfaissJNI.Level1Quantizer_clustering_index_set(swigCPtr, this, Index.getCPtr(value), value);
}
public Index getClustering_index() {
long cPtr = swigfaissJNI.Level1Quantizer_clustering_index_get(swigCPtr, this);
return (cPtr == 0) ? null : new Index(cPtr, false);
}
public void train_q1(long n, SWIGTYPE_p_float x, boolean verbose, MetricType metric_type) {
swigfaissJNI.Level1Quantizer_train_q1(swigCPtr, this, n, SWIGTYPE_p_float.getCPtr(x), verbose, metric_type.swigValue());
}
public long coarse_code_size() {
return swigfaissJNI.Level1Quantizer_coarse_code_size(swigCPtr, this);
}
public void encode_listno(long list_no, SWIGTYPE_p_unsigned_char code) {
swigfaissJNI.Level1Quantizer_encode_listno(swigCPtr, this, list_no, SWIGTYPE_p_unsigned_char.getCPtr(code));
}
public long decode_listno(SWIGTYPE_p_unsigned_char code) {
return swigfaissJNI.Level1Quantizer_decode_listno(swigCPtr, this, SWIGTYPE_p_unsigned_char.getCPtr(code));
}
public Level1Quantizer(Index quantizer, long nlist) {
this(swigfaissJNI.new_Level1Quantizer__SWIG_0(Index.getCPtr(quantizer), quantizer, nlist), true);
}
public Level1Quantizer() {
this(swigfaissJNI.new_Level1Quantizer__SWIG_1(), true);
}
}

View File

@ -1,117 +0,0 @@
/* ----------------------------------------------------------------------------
* This file was automatically generated by SWIG (http://www.swig.org).
* Version 4.0.2
*
* Do not make changes to this file unless you know what you are doing--modify
* the SWIG interface file instead.
* ----------------------------------------------------------------------------- */
package com.twitter.ann.faiss;
public class LinearTransform extends VectorTransform {
private transient long swigCPtr;
protected LinearTransform(long cPtr, boolean cMemoryOwn) {
super(swigfaissJNI.LinearTransform_SWIGUpcast(cPtr), cMemoryOwn);
swigCPtr = cPtr;
}
protected static long getCPtr(LinearTransform obj) {
return (obj == null) ? 0 : obj.swigCPtr;
}
@SuppressWarnings("deprecation")
protected void finalize() {
delete();
}
public synchronized void delete() {
if (swigCPtr != 0) {
if (swigCMemOwn) {
swigCMemOwn = false;
swigfaissJNI.delete_LinearTransform(swigCPtr);
}
swigCPtr = 0;
}
super.delete();
}
public void setHave_bias(boolean value) {
swigfaissJNI.LinearTransform_have_bias_set(swigCPtr, this, value);
}
public boolean getHave_bias() {
return swigfaissJNI.LinearTransform_have_bias_get(swigCPtr, this);
}
public void setIs_orthonormal(boolean value) {
swigfaissJNI.LinearTransform_is_orthonormal_set(swigCPtr, this, value);
}
public boolean getIs_orthonormal() {
return swigfaissJNI.LinearTransform_is_orthonormal_get(swigCPtr, this);
}
public void setA(FloatVector value) {
swigfaissJNI.LinearTransform_A_set(swigCPtr, this, FloatVector.getCPtr(value), value);
}
public FloatVector getA() {
long cPtr = swigfaissJNI.LinearTransform_A_get(swigCPtr, this);
return (cPtr == 0) ? null : new FloatVector(cPtr, false);
}
public void setB(FloatVector value) {
swigfaissJNI.LinearTransform_b_set(swigCPtr, this, FloatVector.getCPtr(value), value);
}
public FloatVector getB() {
long cPtr = swigfaissJNI.LinearTransform_b_get(swigCPtr, this);
return (cPtr == 0) ? null : new FloatVector(cPtr, false);
}
public LinearTransform(int d_in, int d_out, boolean have_bias) {
this(swigfaissJNI.new_LinearTransform__SWIG_0(d_in, d_out, have_bias), true);
}
public LinearTransform(int d_in, int d_out) {
this(swigfaissJNI.new_LinearTransform__SWIG_1(d_in, d_out), true);
}
public LinearTransform(int d_in) {
this(swigfaissJNI.new_LinearTransform__SWIG_2(d_in), true);
}
public LinearTransform() {
this(swigfaissJNI.new_LinearTransform__SWIG_3(), true);
}
public void apply_noalloc(long n, SWIGTYPE_p_float x, SWIGTYPE_p_float xt) {
swigfaissJNI.LinearTransform_apply_noalloc(swigCPtr, this, n, SWIGTYPE_p_float.getCPtr(x), SWIGTYPE_p_float.getCPtr(xt));
}
public void transform_transpose(long n, SWIGTYPE_p_float y, SWIGTYPE_p_float x) {
swigfaissJNI.LinearTransform_transform_transpose(swigCPtr, this, n, SWIGTYPE_p_float.getCPtr(y), SWIGTYPE_p_float.getCPtr(x));
}
public void reverse_transform(long n, SWIGTYPE_p_float xt, SWIGTYPE_p_float x) {
swigfaissJNI.LinearTransform_reverse_transform(swigCPtr, this, n, SWIGTYPE_p_float.getCPtr(xt), SWIGTYPE_p_float.getCPtr(x));
}
public void set_is_orthonormal() {
swigfaissJNI.LinearTransform_set_is_orthonormal(swigCPtr, this);
}
public void setVerbose(boolean value) {
swigfaissJNI.LinearTransform_verbose_set(swigCPtr, this, value);
}
public boolean getVerbose() {
return swigfaissJNI.LinearTransform_verbose_get(swigCPtr, this);
}
public void print_if_verbose(String name, DoubleVector mat, int n, int d) {
swigfaissJNI.LinearTransform_print_if_verbose(swigCPtr, this, name, DoubleVector.getCPtr(mat), mat, n, d);
}
}

View File

@ -1,76 +0,0 @@
/* ----------------------------------------------------------------------------
* This file was automatically generated by SWIG (http://www.swig.org).
* Version 4.0.2
*
* Do not make changes to this file unless you know what you are doing--modify
* the SWIG interface file instead.
* ----------------------------------------------------------------------------- */
package com.twitter.ann.faiss;
public class LongVector {
private transient long swigCPtr;
protected transient boolean swigCMemOwn;
protected LongVector(long cPtr, boolean cMemoryOwn) {
swigCMemOwn = cMemoryOwn;
swigCPtr = cPtr;
}
protected static long getCPtr(LongVector obj) {
return (obj == null) ? 0 : obj.swigCPtr;
}
@SuppressWarnings("deprecation")
protected void finalize() {
delete();
}
public synchronized void delete() {
if (swigCPtr != 0) {
if (swigCMemOwn) {
swigCMemOwn = false;
swigfaissJNI.delete_LongVector(swigCPtr);
}
swigCPtr = 0;
}
}
public LongVector() {
this(swigfaissJNI.new_LongVector(), true);
}
public void push_back(long arg0) {
swigfaissJNI.LongVector_push_back(swigCPtr, this, arg0);
}
public void clear() {
swigfaissJNI.LongVector_clear(swigCPtr, this);
}
public SWIGTYPE_p_long_long data() {
long cPtr = swigfaissJNI.LongVector_data(swigCPtr, this);
return (cPtr == 0) ? null : new SWIGTYPE_p_long_long(cPtr, false);
}
public long size() {
return swigfaissJNI.LongVector_size(swigCPtr, this);
}
public long at(long n) {
return swigfaissJNI.LongVector_at(swigCPtr, this, n);
}
public void resize(long n) {
swigfaissJNI.LongVector_resize(swigCPtr, this, n);
}
public void reserve(long n) {
swigfaissJNI.LongVector_reserve(swigCPtr, this, n);
}
public void swap(LongVector other) {
swigfaissJNI.LongVector_swap(swigCPtr, this, LongVector.getCPtr(other), other);
}
}

View File

@ -1,76 +0,0 @@
/* ----------------------------------------------------------------------------
* This file was automatically generated by SWIG (http://www.swig.org).
* Version 4.0.2
*
* Do not make changes to this file unless you know what you are doing--modify
* the SWIG interface file instead.
* ----------------------------------------------------------------------------- */
package com.twitter.ann.faiss;
public class LongVectorVector {
private transient long swigCPtr;
protected transient boolean swigCMemOwn;
protected LongVectorVector(long cPtr, boolean cMemoryOwn) {
swigCMemOwn = cMemoryOwn;
swigCPtr = cPtr;
}
protected static long getCPtr(LongVectorVector obj) {
return (obj == null) ? 0 : obj.swigCPtr;
}
@SuppressWarnings("deprecation")
protected void finalize() {
delete();
}
public synchronized void delete() {
if (swigCPtr != 0) {
if (swigCMemOwn) {
swigCMemOwn = false;
swigfaissJNI.delete_LongVectorVector(swigCPtr);
}
swigCPtr = 0;
}
}
public LongVectorVector() {
this(swigfaissJNI.new_LongVectorVector(), true);
}
public void push_back(SWIGTYPE_p_std__vectorT_long_t arg0) {
swigfaissJNI.LongVectorVector_push_back(swigCPtr, this, SWIGTYPE_p_std__vectorT_long_t.getCPtr(arg0));
}
public void clear() {
swigfaissJNI.LongVectorVector_clear(swigCPtr, this);
}
public SWIGTYPE_p_std__vectorT_long_t data() {
long cPtr = swigfaissJNI.LongVectorVector_data(swigCPtr, this);
return (cPtr == 0) ? null : new SWIGTYPE_p_std__vectorT_long_t(cPtr, false);
}
public long size() {
return swigfaissJNI.LongVectorVector_size(swigCPtr, this);
}
public SWIGTYPE_p_std__vectorT_long_t at(long n) {
return new SWIGTYPE_p_std__vectorT_long_t(swigfaissJNI.LongVectorVector_at(swigCPtr, this, n), true);
}
public void resize(long n) {
swigfaissJNI.LongVectorVector_resize(swigCPtr, this, n);
}
public void reserve(long n) {
swigfaissJNI.LongVectorVector_reserve(swigCPtr, this, n);
}
public void swap(LongVectorVector other) {
swigfaissJNI.LongVectorVector_swap(swigCPtr, this, LongVectorVector.getCPtr(other), other);
}
}

View File

@ -1,63 +0,0 @@
/* ----------------------------------------------------------------------------
* This file was automatically generated by SWIG (http://www.swig.org).
* Version 4.0.2
*
* Do not make changes to this file unless you know what you are doing--modify
* the SWIG interface file instead.
* ----------------------------------------------------------------------------- */
package com.twitter.ann.faiss;
public class MapLong2Long {
private transient long swigCPtr;
protected transient boolean swigCMemOwn;
protected MapLong2Long(long cPtr, boolean cMemoryOwn) {
swigCMemOwn = cMemoryOwn;
swigCPtr = cPtr;
}
protected static long getCPtr(MapLong2Long obj) {
return (obj == null) ? 0 : obj.swigCPtr;
}
@SuppressWarnings("deprecation")
protected void finalize() {
delete();
}
public synchronized void delete() {
if (swigCPtr != 0) {
if (swigCMemOwn) {
swigCMemOwn = false;
swigfaissJNI.delete_MapLong2Long(swigCPtr);
}
swigCPtr = 0;
}
}
public void setMap(SWIGTYPE_p_std__unordered_mapT_long_long_t value) {
swigfaissJNI.MapLong2Long_map_set(swigCPtr, this, SWIGTYPE_p_std__unordered_mapT_long_long_t.getCPtr(value));
}
public SWIGTYPE_p_std__unordered_mapT_long_long_t getMap() {
return new SWIGTYPE_p_std__unordered_mapT_long_long_t(swigfaissJNI.MapLong2Long_map_get(swigCPtr, this), true);
}
public void add(long n, SWIGTYPE_p_long keys, SWIGTYPE_p_long vals) {
swigfaissJNI.MapLong2Long_add(swigCPtr, this, n, SWIGTYPE_p_long.getCPtr(keys), SWIGTYPE_p_long.getCPtr(vals));
}
public int search(int key) {
return swigfaissJNI.MapLong2Long_search(swigCPtr, this, key);
}
public void search_multiple(long n, SWIGTYPE_p_long keys, SWIGTYPE_p_long vals) {
swigfaissJNI.MapLong2Long_search_multiple(swigCPtr, this, n, SWIGTYPE_p_long.getCPtr(keys), SWIGTYPE_p_long.getCPtr(vals));
}
public MapLong2Long() {
this(swigfaissJNI.new_MapLong2Long(), true);
}
}

View File

@ -1,95 +0,0 @@
/* ----------------------------------------------------------------------------
* This file was automatically generated by SWIG (http://www.swig.org).
* Version 4.0.2
*
* Do not make changes to this file unless you know what you are doing--modify
* the SWIG interface file instead.
* ----------------------------------------------------------------------------- */
package com.twitter.ann.faiss;
public class MaskedInvertedLists extends ReadOnlyInvertedLists {
private transient long swigCPtr;
protected MaskedInvertedLists(long cPtr, boolean cMemoryOwn) {
super(swigfaissJNI.MaskedInvertedLists_SWIGUpcast(cPtr), cMemoryOwn);
swigCPtr = cPtr;
}
protected static long getCPtr(MaskedInvertedLists obj) {
return (obj == null) ? 0 : obj.swigCPtr;
}
@SuppressWarnings("deprecation")
protected void finalize() {
delete();
}
public synchronized void delete() {
if (swigCPtr != 0) {
if (swigCMemOwn) {
swigCMemOwn = false;
swigfaissJNI.delete_MaskedInvertedLists(swigCPtr);
}
swigCPtr = 0;
}
super.delete();
}
public void setIl0(InvertedLists value) {
swigfaissJNI.MaskedInvertedLists_il0_set(swigCPtr, this, InvertedLists.getCPtr(value), value);
}
public InvertedLists getIl0() {
long cPtr = swigfaissJNI.MaskedInvertedLists_il0_get(swigCPtr, this);
return (cPtr == 0) ? null : new InvertedLists(cPtr, false);
}
public void setIl1(InvertedLists value) {
swigfaissJNI.MaskedInvertedLists_il1_set(swigCPtr, this, InvertedLists.getCPtr(value), value);
}
public InvertedLists getIl1() {
long cPtr = swigfaissJNI.MaskedInvertedLists_il1_get(swigCPtr, this);
return (cPtr == 0) ? null : new InvertedLists(cPtr, false);
}
public MaskedInvertedLists(InvertedLists il0, InvertedLists il1) {
this(swigfaissJNI.new_MaskedInvertedLists(InvertedLists.getCPtr(il0), il0, InvertedLists.getCPtr(il1), il1), true);
}
public long list_size(long list_no) {
return swigfaissJNI.MaskedInvertedLists_list_size(swigCPtr, this, list_no);
}
public SWIGTYPE_p_unsigned_char get_codes(long list_no) {
long cPtr = swigfaissJNI.MaskedInvertedLists_get_codes(swigCPtr, this, list_no);
return (cPtr == 0) ? null : new SWIGTYPE_p_unsigned_char(cPtr, false);
}
public LongVector get_ids(long list_no) {
return new LongVector(swigfaissJNI.MaskedInvertedLists_get_ids(swigCPtr, this, list_no), false);
}
public void release_codes(long list_no, SWIGTYPE_p_unsigned_char codes) {
swigfaissJNI.MaskedInvertedLists_release_codes(swigCPtr, this, list_no, SWIGTYPE_p_unsigned_char.getCPtr(codes));
}
public void release_ids(long list_no, LongVector ids) {
swigfaissJNI.MaskedInvertedLists_release_ids(swigCPtr, this, list_no, SWIGTYPE_p_long_long.getCPtr(ids.data()), ids);
}
public long get_single_id(long list_no, long offset) {
return swigfaissJNI.MaskedInvertedLists_get_single_id(swigCPtr, this, list_no, offset);
}
public SWIGTYPE_p_unsigned_char get_single_code(long list_no, long offset) {
long cPtr = swigfaissJNI.MaskedInvertedLists_get_single_code(swigCPtr, this, list_no, offset);
return (cPtr == 0) ? null : new SWIGTYPE_p_unsigned_char(cPtr, false);
}
public void prefetch_lists(LongVector list_nos, int nlist) {
swigfaissJNI.MaskedInvertedLists_prefetch_lists(swigCPtr, this, SWIGTYPE_p_long_long.getCPtr(list_nos.data()), list_nos, nlist);
}
}

View File

@ -1,60 +0,0 @@
/* ----------------------------------------------------------------------------
* This file was automatically generated by SWIG (http://www.swig.org).
* Version 4.0.2
*
* Do not make changes to this file unless you know what you are doing--modify
* the SWIG interface file instead.
* ----------------------------------------------------------------------------- */
package com.twitter.ann.faiss;
public final class MetricType {
public final static MetricType METRIC_INNER_PRODUCT = new MetricType("METRIC_INNER_PRODUCT", swigfaissJNI.METRIC_INNER_PRODUCT_get());
public final static MetricType METRIC_L2 = new MetricType("METRIC_L2", swigfaissJNI.METRIC_L2_get());
public final static MetricType METRIC_L1 = new MetricType("METRIC_L1");
public final static MetricType METRIC_Linf = new MetricType("METRIC_Linf");
public final static MetricType METRIC_Lp = new MetricType("METRIC_Lp");
public final static MetricType METRIC_Canberra = new MetricType("METRIC_Canberra", swigfaissJNI.METRIC_Canberra_get());
public final static MetricType METRIC_BrayCurtis = new MetricType("METRIC_BrayCurtis");
public final static MetricType METRIC_JensenShannon = new MetricType("METRIC_JensenShannon");
public final int swigValue() {
return swigValue;
}
public String toString() {
return swigName;
}
public static MetricType swigToEnum(int swigValue) {
if (swigValue < swigValues.length && swigValue >= 0 && swigValues[swigValue].swigValue == swigValue)
return swigValues[swigValue];
for (int i = 0; i < swigValues.length; i++)
if (swigValues[i].swigValue == swigValue)
return swigValues[i];
throw new IllegalArgumentException("No enum " + MetricType.class + " with value " + swigValue);
}
private MetricType(String swigName) {
this.swigName = swigName;
this.swigValue = swigNext++;
}
private MetricType(String swigName, int swigValue) {
this.swigName = swigName;
this.swigValue = swigValue;
swigNext = swigValue+1;
}
private MetricType(String swigName, MetricType swigEnum) {
this.swigName = swigName;
this.swigValue = swigEnum.swigValue;
swigNext = this.swigValue+1;
}
private static MetricType[] swigValues = { METRIC_INNER_PRODUCT, METRIC_L2, METRIC_L1, METRIC_Linf, METRIC_Lp, METRIC_Canberra, METRIC_BrayCurtis, METRIC_JensenShannon };
private static int swigNext = 0;
private final int swigValue;
private final String swigName;
}

View File

@ -1,76 +0,0 @@
/* ----------------------------------------------------------------------------
* This file was automatically generated by SWIG (http://www.swig.org).
* Version 4.0.2
*
* Do not make changes to this file unless you know what you are doing--modify
* the SWIG interface file instead.
* ----------------------------------------------------------------------------- */
package com.twitter.ann.faiss;
public class MultiIndexQuantizer extends Index {
private transient long swigCPtr;
protected MultiIndexQuantizer(long cPtr, boolean cMemoryOwn) {
super(swigfaissJNI.MultiIndexQuantizer_SWIGUpcast(cPtr), cMemoryOwn);
swigCPtr = cPtr;
}
protected static long getCPtr(MultiIndexQuantizer obj) {
return (obj == null) ? 0 : obj.swigCPtr;
}
@SuppressWarnings("deprecation")
protected void finalize() {
delete();
}
public synchronized void delete() {
if (swigCPtr != 0) {
if (swigCMemOwn) {
swigCMemOwn = false;
swigfaissJNI.delete_MultiIndexQuantizer(swigCPtr);
}
swigCPtr = 0;
}
super.delete();
}
public void setPq(ProductQuantizer value) {
swigfaissJNI.MultiIndexQuantizer_pq_set(swigCPtr, this, ProductQuantizer.getCPtr(value), value);
}
public ProductQuantizer getPq() {
long cPtr = swigfaissJNI.MultiIndexQuantizer_pq_get(swigCPtr, this);
return (cPtr == 0) ? null : new ProductQuantizer(cPtr, false);
}
public MultiIndexQuantizer(int d, long M, long nbits) {
this(swigfaissJNI.new_MultiIndexQuantizer__SWIG_0(d, M, nbits), true);
}
public void train(long n, SWIGTYPE_p_float x) {
swigfaissJNI.MultiIndexQuantizer_train(swigCPtr, this, n, SWIGTYPE_p_float.getCPtr(x));
}
public void search(long n, SWIGTYPE_p_float x, long k, SWIGTYPE_p_float distances, LongVector labels) {
swigfaissJNI.MultiIndexQuantizer_search(swigCPtr, this, n, SWIGTYPE_p_float.getCPtr(x), k, SWIGTYPE_p_float.getCPtr(distances), SWIGTYPE_p_long_long.getCPtr(labels.data()), labels);
}
public void add(long n, SWIGTYPE_p_float x) {
swigfaissJNI.MultiIndexQuantizer_add(swigCPtr, this, n, SWIGTYPE_p_float.getCPtr(x));
}
public void reset() {
swigfaissJNI.MultiIndexQuantizer_reset(swigCPtr, this);
}
public MultiIndexQuantizer() {
this(swigfaissJNI.new_MultiIndexQuantizer__SWIG_1(), true);
}
public void reconstruct(long key, SWIGTYPE_p_float recons) {
swigfaissJNI.MultiIndexQuantizer_reconstruct(swigCPtr, this, key, SWIGTYPE_p_float.getCPtr(recons));
}
}

View File

@ -1,72 +0,0 @@
/* ----------------------------------------------------------------------------
* This file was automatically generated by SWIG (http://www.swig.org).
* Version 4.0.2
*
* Do not make changes to this file unless you know what you are doing--modify
* the SWIG interface file instead.
* ----------------------------------------------------------------------------- */
package com.twitter.ann.faiss;
public class MultiIndexQuantizer2 extends MultiIndexQuantizer {
private transient long swigCPtr;
protected MultiIndexQuantizer2(long cPtr, boolean cMemoryOwn) {
super(swigfaissJNI.MultiIndexQuantizer2_SWIGUpcast(cPtr), cMemoryOwn);
swigCPtr = cPtr;
}
protected static long getCPtr(MultiIndexQuantizer2 obj) {
return (obj == null) ? 0 : obj.swigCPtr;
}
@SuppressWarnings("deprecation")
protected void finalize() {
delete();
}
public synchronized void delete() {
if (swigCPtr != 0) {
if (swigCMemOwn) {
swigCMemOwn = false;
swigfaissJNI.delete_MultiIndexQuantizer2(swigCPtr);
}
swigCPtr = 0;
}
super.delete();
}
public void setAssign_indexes(SWIGTYPE_p_std__vectorT_faiss__Index_p_t value) {
swigfaissJNI.MultiIndexQuantizer2_assign_indexes_set(swigCPtr, this, SWIGTYPE_p_std__vectorT_faiss__Index_p_t.getCPtr(value));
}
public SWIGTYPE_p_std__vectorT_faiss__Index_p_t getAssign_indexes() {
long cPtr = swigfaissJNI.MultiIndexQuantizer2_assign_indexes_get(swigCPtr, this);
return (cPtr == 0) ? null : new SWIGTYPE_p_std__vectorT_faiss__Index_p_t(cPtr, false);
}
public void setOwn_fields(boolean value) {
swigfaissJNI.MultiIndexQuantizer2_own_fields_set(swigCPtr, this, value);
}
public boolean getOwn_fields() {
return swigfaissJNI.MultiIndexQuantizer2_own_fields_get(swigCPtr, this);
}
public MultiIndexQuantizer2(int d, long M, long nbits, SWIGTYPE_p_p_faiss__Index indexes) {
this(swigfaissJNI.new_MultiIndexQuantizer2__SWIG_0(d, M, nbits, SWIGTYPE_p_p_faiss__Index.getCPtr(indexes)), true);
}
public MultiIndexQuantizer2(int d, long nbits, Index assign_index_0, Index assign_index_1) {
this(swigfaissJNI.new_MultiIndexQuantizer2__SWIG_1(d, nbits, Index.getCPtr(assign_index_0), assign_index_0, Index.getCPtr(assign_index_1), assign_index_1), true);
}
public void train(long n, SWIGTYPE_p_float x) {
swigfaissJNI.MultiIndexQuantizer2_train(swigCPtr, this, n, SWIGTYPE_p_float.getCPtr(x));
}
public void search(long n, SWIGTYPE_p_float x, long k, SWIGTYPE_p_float distances, LongVector labels) {
swigfaissJNI.MultiIndexQuantizer2_search(swigCPtr, this, n, SWIGTYPE_p_float.getCPtr(x), k, SWIGTYPE_p_float.getCPtr(distances), SWIGTYPE_p_long_long.getCPtr(labels.data()), labels);
}
}

View File

@ -1,67 +0,0 @@
/* ----------------------------------------------------------------------------
* This file was automatically generated by SWIG (http://www.swig.org).
* Version 4.0.2
*
* Do not make changes to this file unless you know what you are doing--modify
* the SWIG interface file instead.
* ----------------------------------------------------------------------------- */
package com.twitter.ann.faiss;
public class NormalizationTransform extends VectorTransform {
private transient long swigCPtr;
protected NormalizationTransform(long cPtr, boolean cMemoryOwn) {
super(swigfaissJNI.NormalizationTransform_SWIGUpcast(cPtr), cMemoryOwn);
swigCPtr = cPtr;
}
protected static long getCPtr(NormalizationTransform obj) {
return (obj == null) ? 0 : obj.swigCPtr;
}
@SuppressWarnings("deprecation")
protected void finalize() {
delete();
}
public synchronized void delete() {
if (swigCPtr != 0) {
if (swigCMemOwn) {
swigCMemOwn = false;
swigfaissJNI.delete_NormalizationTransform(swigCPtr);
}
swigCPtr = 0;
}
super.delete();
}
public void setNorm(float value) {
swigfaissJNI.NormalizationTransform_norm_set(swigCPtr, this, value);
}
public float getNorm() {
return swigfaissJNI.NormalizationTransform_norm_get(swigCPtr, this);
}
public NormalizationTransform(int d, float norm) {
this(swigfaissJNI.new_NormalizationTransform__SWIG_0(d, norm), true);
}
public NormalizationTransform(int d) {
this(swigfaissJNI.new_NormalizationTransform__SWIG_1(d), true);
}
public NormalizationTransform() {
this(swigfaissJNI.new_NormalizationTransform__SWIG_2(), true);
}
public void apply_noalloc(long n, SWIGTYPE_p_float x, SWIGTYPE_p_float xt) {
swigfaissJNI.NormalizationTransform_apply_noalloc(swigCPtr, this, n, SWIGTYPE_p_float.getCPtr(x), SWIGTYPE_p_float.getCPtr(xt));
}
public void reverse_transform(long n, SWIGTYPE_p_float xt, SWIGTYPE_p_float x) {
swigfaissJNI.NormalizationTransform_reverse_transform(swigCPtr, this, n, SWIGTYPE_p_float.getCPtr(xt), SWIGTYPE_p_float.getCPtr(x));
}
}

View File

@ -1,116 +0,0 @@
/* ----------------------------------------------------------------------------
* This file was automatically generated by SWIG (http://www.swig.org).
* Version 4.0.2
*
* Do not make changes to this file unless you know what you are doing--modify
* the SWIG interface file instead.
* ----------------------------------------------------------------------------- */
package com.twitter.ann.faiss;
public class OPQMatrix extends LinearTransform {
private transient long swigCPtr;
protected OPQMatrix(long cPtr, boolean cMemoryOwn) {
super(swigfaissJNI.OPQMatrix_SWIGUpcast(cPtr), cMemoryOwn);
swigCPtr = cPtr;
}
protected static long getCPtr(OPQMatrix obj) {
return (obj == null) ? 0 : obj.swigCPtr;
}
@SuppressWarnings("deprecation")
protected void finalize() {
delete();
}
public synchronized void delete() {
if (swigCPtr != 0) {
if (swigCMemOwn) {
swigCMemOwn = false;
swigfaissJNI.delete_OPQMatrix(swigCPtr);
}
swigCPtr = 0;
}
super.delete();
}
public void setM(int value) {
swigfaissJNI.OPQMatrix_M_set(swigCPtr, this, value);
}
public int getM() {
return swigfaissJNI.OPQMatrix_M_get(swigCPtr, this);
}
public void setNiter(int value) {
swigfaissJNI.OPQMatrix_niter_set(swigCPtr, this, value);
}
public int getNiter() {
return swigfaissJNI.OPQMatrix_niter_get(swigCPtr, this);
}
public void setNiter_pq(int value) {
swigfaissJNI.OPQMatrix_niter_pq_set(swigCPtr, this, value);
}
public int getNiter_pq() {
return swigfaissJNI.OPQMatrix_niter_pq_get(swigCPtr, this);
}
public void setNiter_pq_0(int value) {
swigfaissJNI.OPQMatrix_niter_pq_0_set(swigCPtr, this, value);
}
public int getNiter_pq_0() {
return swigfaissJNI.OPQMatrix_niter_pq_0_get(swigCPtr, this);
}
public void setMax_train_points(long value) {
swigfaissJNI.OPQMatrix_max_train_points_set(swigCPtr, this, value);
}
public long getMax_train_points() {
return swigfaissJNI.OPQMatrix_max_train_points_get(swigCPtr, this);
}
public void setVerbose(boolean value) {
swigfaissJNI.OPQMatrix_verbose_set(swigCPtr, this, value);
}
public boolean getVerbose() {
return swigfaissJNI.OPQMatrix_verbose_get(swigCPtr, this);
}
public void setPq(ProductQuantizer value) {
swigfaissJNI.OPQMatrix_pq_set(swigCPtr, this, ProductQuantizer.getCPtr(value), value);
}
public ProductQuantizer getPq() {
long cPtr = swigfaissJNI.OPQMatrix_pq_get(swigCPtr, this);
return (cPtr == 0) ? null : new ProductQuantizer(cPtr, false);
}
public OPQMatrix(int d, int M, int d2) {
this(swigfaissJNI.new_OPQMatrix__SWIG_0(d, M, d2), true);
}
public OPQMatrix(int d, int M) {
this(swigfaissJNI.new_OPQMatrix__SWIG_1(d, M), true);
}
public OPQMatrix(int d) {
this(swigfaissJNI.new_OPQMatrix__SWIG_2(d), true);
}
public OPQMatrix() {
this(swigfaissJNI.new_OPQMatrix__SWIG_3(), true);
}
public void train(long n, SWIGTYPE_p_float x) {
swigfaissJNI.OPQMatrix_train(swigCPtr, this, n, SWIGTYPE_p_float.getCPtr(x));
}
}

View File

@ -1,251 +0,0 @@
/* ----------------------------------------------------------------------------
* This file was automatically generated by SWIG (http://www.swig.org).
* Version 4.0.2
*
* Do not make changes to this file unless you know what you are doing--modify
* the SWIG interface file instead.
* ----------------------------------------------------------------------------- */
package com.twitter.ann.faiss;
public class OnDiskInvertedLists extends InvertedLists {
private transient long swigCPtr;
protected OnDiskInvertedLists(long cPtr, boolean cMemoryOwn) {
super(swigfaissJNI.OnDiskInvertedLists_SWIGUpcast(cPtr), cMemoryOwn);
swigCPtr = cPtr;
}
protected static long getCPtr(OnDiskInvertedLists obj) {
return (obj == null) ? 0 : obj.swigCPtr;
}
@SuppressWarnings("deprecation")
protected void finalize() {
delete();
}
public synchronized void delete() {
if (swigCPtr != 0) {
if (swigCMemOwn) {
swigCMemOwn = false;
swigfaissJNI.delete_OnDiskInvertedLists(swigCPtr);
}
swigCPtr = 0;
}
super.delete();
}
public void setLists(SWIGTYPE_p_std__vectorT_faiss__OnDiskOneList_t value) {
swigfaissJNI.OnDiskInvertedLists_lists_set(swigCPtr, this, SWIGTYPE_p_std__vectorT_faiss__OnDiskOneList_t.getCPtr(value));
}
public SWIGTYPE_p_std__vectorT_faiss__OnDiskOneList_t getLists() {
long cPtr = swigfaissJNI.OnDiskInvertedLists_lists_get(swigCPtr, this);
return (cPtr == 0) ? null : new SWIGTYPE_p_std__vectorT_faiss__OnDiskOneList_t(cPtr, false);
}
static public class Slot {
private transient long swigCPtr;
protected transient boolean swigCMemOwn;
protected Slot(long cPtr, boolean cMemoryOwn) {
swigCMemOwn = cMemoryOwn;
swigCPtr = cPtr;
}
protected static long getCPtr(Slot obj) {
return (obj == null) ? 0 : obj.swigCPtr;
}
@SuppressWarnings("deprecation")
protected void finalize() {
delete();
}
public synchronized void delete() {
if (swigCPtr != 0) {
if (swigCMemOwn) {
swigCMemOwn = false;
swigfaissJNI.delete_OnDiskInvertedLists_Slot(swigCPtr);
}
swigCPtr = 0;
}
}
public void setOffset(long value) {
swigfaissJNI.OnDiskInvertedLists_Slot_offset_set(swigCPtr, this, value);
}
public long getOffset() {
return swigfaissJNI.OnDiskInvertedLists_Slot_offset_get(swigCPtr, this);
}
public void setCapacity(long value) {
swigfaissJNI.OnDiskInvertedLists_Slot_capacity_set(swigCPtr, this, value);
}
public long getCapacity() {
return swigfaissJNI.OnDiskInvertedLists_Slot_capacity_get(swigCPtr, this);
}
public Slot(long offset, long capacity) {
this(swigfaissJNI.new_OnDiskInvertedLists_Slot__SWIG_0(offset, capacity), true);
}
public Slot() {
this(swigfaissJNI.new_OnDiskInvertedLists_Slot__SWIG_1(), true);
}
}
public void setSlots(SWIGTYPE_p_std__listT_faiss__OnDiskInvertedLists__Slot_t value) {
swigfaissJNI.OnDiskInvertedLists_slots_set(swigCPtr, this, SWIGTYPE_p_std__listT_faiss__OnDiskInvertedLists__Slot_t.getCPtr(value));
}
public SWIGTYPE_p_std__listT_faiss__OnDiskInvertedLists__Slot_t getSlots() {
long cPtr = swigfaissJNI.OnDiskInvertedLists_slots_get(swigCPtr, this);
return (cPtr == 0) ? null : new SWIGTYPE_p_std__listT_faiss__OnDiskInvertedLists__Slot_t(cPtr, false);
}
public void setFilename(String value) {
swigfaissJNI.OnDiskInvertedLists_filename_set(swigCPtr, this, value);
}
public String getFilename() {
return swigfaissJNI.OnDiskInvertedLists_filename_get(swigCPtr, this);
}
public void setTotsize(long value) {
swigfaissJNI.OnDiskInvertedLists_totsize_set(swigCPtr, this, value);
}
public long getTotsize() {
return swigfaissJNI.OnDiskInvertedLists_totsize_get(swigCPtr, this);
}
public void setPtr(SWIGTYPE_p_unsigned_char value) {
swigfaissJNI.OnDiskInvertedLists_ptr_set(swigCPtr, this, SWIGTYPE_p_unsigned_char.getCPtr(value));
}
public SWIGTYPE_p_unsigned_char getPtr() {
long cPtr = swigfaissJNI.OnDiskInvertedLists_ptr_get(swigCPtr, this);
return (cPtr == 0) ? null : new SWIGTYPE_p_unsigned_char(cPtr, false);
}
public void setRead_only(boolean value) {
swigfaissJNI.OnDiskInvertedLists_read_only_set(swigCPtr, this, value);
}
public boolean getRead_only() {
return swigfaissJNI.OnDiskInvertedLists_read_only_get(swigCPtr, this);
}
public OnDiskInvertedLists(long nlist, long code_size, String filename) {
this(swigfaissJNI.new_OnDiskInvertedLists__SWIG_0(nlist, code_size, filename), true);
}
public long list_size(long list_no) {
return swigfaissJNI.OnDiskInvertedLists_list_size(swigCPtr, this, list_no);
}
public SWIGTYPE_p_unsigned_char get_codes(long list_no) {
long cPtr = swigfaissJNI.OnDiskInvertedLists_get_codes(swigCPtr, this, list_no);
return (cPtr == 0) ? null : new SWIGTYPE_p_unsigned_char(cPtr, false);
}
public LongVector get_ids(long list_no) {
return new LongVector(swigfaissJNI.OnDiskInvertedLists_get_ids(swigCPtr, this, list_no), false);
}
public long add_entries(long list_no, long n_entry, LongVector ids, SWIGTYPE_p_unsigned_char code) {
return swigfaissJNI.OnDiskInvertedLists_add_entries(swigCPtr, this, list_no, n_entry, SWIGTYPE_p_long_long.getCPtr(ids.data()), ids, SWIGTYPE_p_unsigned_char.getCPtr(code));
}
public void update_entries(long list_no, long offset, long n_entry, LongVector ids, SWIGTYPE_p_unsigned_char code) {
swigfaissJNI.OnDiskInvertedLists_update_entries(swigCPtr, this, list_no, offset, n_entry, SWIGTYPE_p_long_long.getCPtr(ids.data()), ids, SWIGTYPE_p_unsigned_char.getCPtr(code));
}
public void resize(long list_no, long new_size) {
swigfaissJNI.OnDiskInvertedLists_resize(swigCPtr, this, list_no, new_size);
}
public long merge_from(SWIGTYPE_p_p_faiss__InvertedLists ils, int n_il, boolean verbose) {
return swigfaissJNI.OnDiskInvertedLists_merge_from__SWIG_0(swigCPtr, this, SWIGTYPE_p_p_faiss__InvertedLists.getCPtr(ils), n_il, verbose);
}
public long merge_from(SWIGTYPE_p_p_faiss__InvertedLists ils, int n_il) {
return swigfaissJNI.OnDiskInvertedLists_merge_from__SWIG_1(swigCPtr, this, SWIGTYPE_p_p_faiss__InvertedLists.getCPtr(ils), n_il);
}
public long merge_from_1(InvertedLists il, boolean verbose) {
return swigfaissJNI.OnDiskInvertedLists_merge_from_1__SWIG_0(swigCPtr, this, InvertedLists.getCPtr(il), il, verbose);
}
public long merge_from_1(InvertedLists il) {
return swigfaissJNI.OnDiskInvertedLists_merge_from_1__SWIG_1(swigCPtr, this, InvertedLists.getCPtr(il), il);
}
public void crop_invlists(long l0, long l1) {
swigfaissJNI.OnDiskInvertedLists_crop_invlists(swigCPtr, this, l0, l1);
}
public void prefetch_lists(LongVector list_nos, int nlist) {
swigfaissJNI.OnDiskInvertedLists_prefetch_lists(swigCPtr, this, SWIGTYPE_p_long_long.getCPtr(list_nos.data()), list_nos, nlist);
}
public void setLocks(SWIGTYPE_p_faiss__LockLevels value) {
swigfaissJNI.OnDiskInvertedLists_locks_set(swigCPtr, this, SWIGTYPE_p_faiss__LockLevels.getCPtr(value));
}
public SWIGTYPE_p_faiss__LockLevels getLocks() {
long cPtr = swigfaissJNI.OnDiskInvertedLists_locks_get(swigCPtr, this);
return (cPtr == 0) ? null : new SWIGTYPE_p_faiss__LockLevels(cPtr, false);
}
public void setPf(SWIGTYPE_p_faiss__OnDiskInvertedLists__OngoingPrefetch value) {
swigfaissJNI.OnDiskInvertedLists_pf_set(swigCPtr, this, SWIGTYPE_p_faiss__OnDiskInvertedLists__OngoingPrefetch.getCPtr(value));
}
public SWIGTYPE_p_faiss__OnDiskInvertedLists__OngoingPrefetch getPf() {
long cPtr = swigfaissJNI.OnDiskInvertedLists_pf_get(swigCPtr, this);
return (cPtr == 0) ? null : new SWIGTYPE_p_faiss__OnDiskInvertedLists__OngoingPrefetch(cPtr, false);
}
public void setPrefetch_nthread(int value) {
swigfaissJNI.OnDiskInvertedLists_prefetch_nthread_set(swigCPtr, this, value);
}
public int getPrefetch_nthread() {
return swigfaissJNI.OnDiskInvertedLists_prefetch_nthread_get(swigCPtr, this);
}
public void do_mmap() {
swigfaissJNI.OnDiskInvertedLists_do_mmap(swigCPtr, this);
}
public void update_totsize(long new_totsize) {
swigfaissJNI.OnDiskInvertedLists_update_totsize(swigCPtr, this, new_totsize);
}
public void resize_locked(long list_no, long new_size) {
swigfaissJNI.OnDiskInvertedLists_resize_locked(swigCPtr, this, list_no, new_size);
}
public long allocate_slot(long capacity) {
return swigfaissJNI.OnDiskInvertedLists_allocate_slot(swigCPtr, this, capacity);
}
public void free_slot(long offset, long capacity) {
swigfaissJNI.OnDiskInvertedLists_free_slot(swigCPtr, this, offset, capacity);
}
public void set_all_lists_sizes(SWIGTYPE_p_unsigned_long sizes) {
swigfaissJNI.OnDiskInvertedLists_set_all_lists_sizes(swigCPtr, this, SWIGTYPE_p_unsigned_long.getCPtr(sizes));
}
public OnDiskInvertedLists() {
this(swigfaissJNI.new_OnDiskInvertedLists__SWIG_1(), true);
}
}

View File

@ -1,57 +0,0 @@
/* ----------------------------------------------------------------------------
* This file was automatically generated by SWIG (http://www.swig.org).
* Version 4.0.2
*
* Do not make changes to this file unless you know what you are doing--modify
* the SWIG interface file instead.
* ----------------------------------------------------------------------------- */
package com.twitter.ann.faiss;
public class OnDiskInvertedListsIOHook {
private transient long swigCPtr;
protected transient boolean swigCMemOwn;
protected OnDiskInvertedListsIOHook(long cPtr, boolean cMemoryOwn) {
swigCMemOwn = cMemoryOwn;
swigCPtr = cPtr;
}
protected static long getCPtr(OnDiskInvertedListsIOHook obj) {
return (obj == null) ? 0 : obj.swigCPtr;
}
@SuppressWarnings("deprecation")
protected void finalize() {
delete();
}
public synchronized void delete() {
if (swigCPtr != 0) {
if (swigCMemOwn) {
swigCMemOwn = false;
swigfaissJNI.delete_OnDiskInvertedListsIOHook(swigCPtr);
}
swigCPtr = 0;
}
}
public OnDiskInvertedListsIOHook() {
this(swigfaissJNI.new_OnDiskInvertedListsIOHook(), true);
}
public void write(InvertedLists ils, SWIGTYPE_p_IOWriter f) {
swigfaissJNI.OnDiskInvertedListsIOHook_write(swigCPtr, this, InvertedLists.getCPtr(ils), ils, SWIGTYPE_p_IOWriter.getCPtr(f));
}
public InvertedLists read(SWIGTYPE_p_IOReader f, int io_flags) {
long cPtr = swigfaissJNI.OnDiskInvertedListsIOHook_read(swigCPtr, this, SWIGTYPE_p_IOReader.getCPtr(f), io_flags);
return (cPtr == 0) ? null : new InvertedLists(cPtr, false);
}
public InvertedLists read_ArrayInvertedLists(SWIGTYPE_p_IOReader f, int io_flags, long nlist, long code_size, Uint64Vector sizes) {
long cPtr = swigfaissJNI.OnDiskInvertedListsIOHook_read_ArrayInvertedLists(swigCPtr, this, SWIGTYPE_p_IOReader.getCPtr(f), io_flags, nlist, code_size, Uint64Vector.getCPtr(sizes), sizes);
return (cPtr == 0) ? null : new InvertedLists(cPtr, false);
}
}

View File

@ -1,67 +0,0 @@
/* ----------------------------------------------------------------------------
* This file was automatically generated by SWIG (http://www.swig.org).
* Version 4.0.2
*
* Do not make changes to this file unless you know what you are doing--modify
* the SWIG interface file instead.
* ----------------------------------------------------------------------------- */
package com.twitter.ann.faiss;
public class OnDiskOneList {
private transient long swigCPtr;
protected transient boolean swigCMemOwn;
protected OnDiskOneList(long cPtr, boolean cMemoryOwn) {
swigCMemOwn = cMemoryOwn;
swigCPtr = cPtr;
}
protected static long getCPtr(OnDiskOneList obj) {
return (obj == null) ? 0 : obj.swigCPtr;
}
@SuppressWarnings("deprecation")
protected void finalize() {
delete();
}
public synchronized void delete() {
if (swigCPtr != 0) {
if (swigCMemOwn) {
swigCMemOwn = false;
swigfaissJNI.delete_OnDiskOneList(swigCPtr);
}
swigCPtr = 0;
}
}
public void setSize(long value) {
swigfaissJNI.OnDiskOneList_size_set(swigCPtr, this, value);
}
public long getSize() {
return swigfaissJNI.OnDiskOneList_size_get(swigCPtr, this);
}
public void setCapacity(long value) {
swigfaissJNI.OnDiskOneList_capacity_set(swigCPtr, this, value);
}
public long getCapacity() {
return swigfaissJNI.OnDiskOneList_capacity_get(swigCPtr, this);
}
public void setOffset(long value) {
swigfaissJNI.OnDiskOneList_offset_set(swigCPtr, this, value);
}
public long getOffset() {
return swigfaissJNI.OnDiskOneList_offset_get(swigCPtr, this);
}
public OnDiskOneList() {
this(swigfaissJNI.new_OnDiskOneList(), true);
}
}

View File

@ -1,55 +0,0 @@
/* ----------------------------------------------------------------------------
* This file was automatically generated by SWIG (http://www.swig.org).
* Version 4.0.2
*
* Do not make changes to this file unless you know what you are doing--modify
* the SWIG interface file instead.
* ----------------------------------------------------------------------------- */
package com.twitter.ann.faiss;
public class OneRecallAtRCriterion extends AutoTuneCriterion {
private transient long swigCPtr;
protected OneRecallAtRCriterion(long cPtr, boolean cMemoryOwn) {
super(swigfaissJNI.OneRecallAtRCriterion_SWIGUpcast(cPtr), cMemoryOwn);
swigCPtr = cPtr;
}
protected static long getCPtr(OneRecallAtRCriterion obj) {
return (obj == null) ? 0 : obj.swigCPtr;
}
@SuppressWarnings("deprecation")
protected void finalize() {
delete();
}
public synchronized void delete() {
if (swigCPtr != 0) {
if (swigCMemOwn) {
swigCMemOwn = false;
swigfaissJNI.delete_OneRecallAtRCriterion(swigCPtr);
}
swigCPtr = 0;
}
super.delete();
}
public void setR(long value) {
swigfaissJNI.OneRecallAtRCriterion_R_set(swigCPtr, this, value);
}
public long getR() {
return swigfaissJNI.OneRecallAtRCriterion_R_get(swigCPtr, this);
}
public OneRecallAtRCriterion(long nq, long R) {
this(swigfaissJNI.new_OneRecallAtRCriterion(nq, R), true);
}
public double evaluate(SWIGTYPE_p_float D, LongVector I) {
return swigfaissJNI.OneRecallAtRCriterion_evaluate(swigCPtr, this, SWIGTYPE_p_float.getCPtr(D), SWIGTYPE_p_long_long.getCPtr(I.data()), I);
}
}

Some files were not shown because too many files have changed in this diff Show More