/* ----------------------------------------------------------------------------
 * 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 RangeSearchPartialResult extends BufferList {
  private transient long swigCPtr;

  protected RangeSearchPartialResult(long cPtr, boolean cMemoryOwn) {
    super(swigfaissJNI.RangeSearchPartialResult_SWIGUpcast(cPtr), cMemoryOwn);
    swigCPtr = cPtr;
  }

  protected static long getCPtr(RangeSearchPartialResult 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_RangeSearchPartialResult(swigCPtr);
      }
      swigCPtr = 0;
    }
    super.delete();
  }

  public void setRes(RangeSearchResult value) {
    swigfaissJNI.RangeSearchPartialResult_res_set(swigCPtr, this, RangeSearchResult.getCPtr(value), value);
  }

  public RangeSearchResult getRes() {
    long cPtr = swigfaissJNI.RangeSearchPartialResult_res_get(swigCPtr, this);
    return (cPtr == 0) ? null : new RangeSearchResult(cPtr, false);
  }

  public void setQueries(SWIGTYPE_p_std__vectorT_faiss__RangeQueryResult_t value) {
    swigfaissJNI.RangeSearchPartialResult_queries_set(swigCPtr, this, SWIGTYPE_p_std__vectorT_faiss__RangeQueryResult_t.getCPtr(value));
  }

  public SWIGTYPE_p_std__vectorT_faiss__RangeQueryResult_t getQueries() {
    long cPtr = swigfaissJNI.RangeSearchPartialResult_queries_get(swigCPtr, this);
    return (cPtr == 0) ? null : new SWIGTYPE_p_std__vectorT_faiss__RangeQueryResult_t(cPtr, false);
  }

  public RangeQueryResult new_result(long qno) {
    return new RangeQueryResult(swigfaissJNI.RangeSearchPartialResult_new_result(swigCPtr, this, qno), false);
  }

  public void set_lims() {
    swigfaissJNI.RangeSearchPartialResult_set_lims(swigCPtr, this);
  }

  public void copy_result(boolean incremental) {
    swigfaissJNI.RangeSearchPartialResult_copy_result__SWIG_0(swigCPtr, this, incremental);
  }

  public void copy_result() {
    swigfaissJNI.RangeSearchPartialResult_copy_result__SWIG_1(swigCPtr, this);
  }

  public static void merge(SWIGTYPE_p_std__vectorT_faiss__RangeSearchPartialResult_p_t partial_results, boolean do_delete) {
    swigfaissJNI.RangeSearchPartialResult_merge__SWIG_0(SWIGTYPE_p_std__vectorT_faiss__RangeSearchPartialResult_p_t.getCPtr(partial_results), do_delete);
  }

  public static void merge(SWIGTYPE_p_std__vectorT_faiss__RangeSearchPartialResult_p_t partial_results) {
    swigfaissJNI.RangeSearchPartialResult_merge__SWIG_1(SWIGTYPE_p_std__vectorT_faiss__RangeSearchPartialResult_p_t.getCPtr(partial_results));
  }

}
