73 lines
2.2 KiB
Java
73 lines
2.2 KiB
Java
/* ----------------------------------------------------------------------------
|
|
* 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));
|
|
}
|
|
|
|
}
|