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

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

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

  public FloatVectorVector() {
    this(swigfaissJNI.new_FloatVectorVector(), true);
  }

  public void push_back(FloatVector arg0) {
    swigfaissJNI.FloatVectorVector_push_back(swigCPtr, this, FloatVector.getCPtr(arg0), arg0);
  }

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

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

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

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

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

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

  public void swap(FloatVectorVector other) {
    swigfaissJNI.FloatVectorVector_swap(swigCPtr, this, FloatVectorVector.getCPtr(other), other);
  }

}
