/* ----------------------------------------------------------------------------
 * 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 OperatingPointVector {
  private transient long swigCPtr;
  protected transient boolean swigCMemOwn;

  protected OperatingPointVector(long cPtr, boolean cMemoryOwn) {
    swigCMemOwn = cMemoryOwn;
    swigCPtr = cPtr;
  }

  protected static long getCPtr(OperatingPointVector 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_OperatingPointVector(swigCPtr);
      }
      swigCPtr = 0;
    }
  }

  public OperatingPointVector() {
    this(swigfaissJNI.new_OperatingPointVector(), true);
  }

  public void push_back(OperatingPoint arg0) {
    swigfaissJNI.OperatingPointVector_push_back(swigCPtr, this, OperatingPoint.getCPtr(arg0), arg0);
  }

  public void clear() {
    swigfaissJNI.OperatingPointVector_clear(swigCPtr, this);
  }

  public OperatingPoint data() {
    long cPtr = swigfaissJNI.OperatingPointVector_data(swigCPtr, this);
    return (cPtr == 0) ? null : new OperatingPoint(cPtr, false);
  }

  public long size() {
    return swigfaissJNI.OperatingPointVector_size(swigCPtr, this);
  }

  public OperatingPoint at(long n) {
    return new OperatingPoint(swigfaissJNI.OperatingPointVector_at(swigCPtr, this, n), true);
  }

  public void resize(long n) {
    swigfaissJNI.OperatingPointVector_resize(swigCPtr, this, n);
  }

  public void reserve(long n) {
    swigfaissJNI.OperatingPointVector_reserve(swigCPtr, this, n);
  }

  public void swap(OperatingPointVector other) {
    swigfaissJNI.OperatingPointVector_swap(swigCPtr, this, OperatingPointVector.getCPtr(other), other);
  }

}
