/* ----------------------------------------------------------------------------
 * 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);
  }

}
