the-algorithm/ann/src/main/java/com/twitter/ann/faiss/swig/longArray.java
twitter-team ef4c5eb65e Twitter Recommendation Algorithm
Please note we have force-pushed a new initial commit in order to remove some publicly-available Twitter user information. Note that this process may be required in the future.
2023-03-31 17:36:31 -05:00

62 lines
1.7 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 longArray {
private transient long swigCPtr;
protected transient boolean swigCMemOwn;
protected longArray(long cPtr, boolean cMemoryOwn) {
swigCMemOwn = cMemoryOwn;
swigCPtr = cPtr;
}
protected static long getCPtr(longArray 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_longArray(swigCPtr);
}
swigCPtr = 0;
}
}
public longArray(int nelements) {
this(swigfaissJNI.new_longArray(nelements), true);
}
public long getitem(int index) {
return swigfaissJNI.longArray_getitem(swigCPtr, this, index);
}
public void setitem(int index, long value) {
swigfaissJNI.longArray_setitem(swigCPtr, this, index, value);
}
public SWIGTYPE_p_long_long cast() {
long cPtr = swigfaissJNI.longArray_cast(swigCPtr, this);
return (cPtr == 0) ? null : new SWIGTYPE_p_long_long(cPtr, false);
}
public static longArray frompointer(SWIGTYPE_p_long_long t) {
long cPtr = swigfaissJNI.longArray_frompointer(SWIGTYPE_p_long_long.getCPtr(t));
return (cPtr == 0) ? null : new longArray(cPtr, false);
}
}