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

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

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

  public void setMax_iter(int value) {
    swigfaissJNI.ITQMatrix_max_iter_set(swigCPtr, this, value);
  }

  public int getMax_iter() {
    return swigfaissJNI.ITQMatrix_max_iter_get(swigCPtr, this);
  }

  public void setSeed(int value) {
    swigfaissJNI.ITQMatrix_seed_set(swigCPtr, this, value);
  }

  public int getSeed() {
    return swigfaissJNI.ITQMatrix_seed_get(swigCPtr, this);
  }

  public void setInit_rotation(DoubleVector value) {
    swigfaissJNI.ITQMatrix_init_rotation_set(swigCPtr, this, DoubleVector.getCPtr(value), value);
  }

  public DoubleVector getInit_rotation() {
    long cPtr = swigfaissJNI.ITQMatrix_init_rotation_get(swigCPtr, this);
    return (cPtr == 0) ? null : new DoubleVector(cPtr, false);
  }

  public ITQMatrix(int d) {
    this(swigfaissJNI.new_ITQMatrix__SWIG_0(d), true);
  }

  public ITQMatrix() {
    this(swigfaissJNI.new_ITQMatrix__SWIG_1(), true);
  }

  public void train(long n, SWIGTYPE_p_float x) {
    swigfaissJNI.ITQMatrix_train(swigCPtr, this, n, SWIGTYPE_p_float.getCPtr(x));
  }

}
