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

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

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

  public void setMean(FloatVector value) {
    swigfaissJNI.ITQTransform_mean_set(swigCPtr, this, FloatVector.getCPtr(value), value);
  }

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

  public void setDo_pca(boolean value) {
    swigfaissJNI.ITQTransform_do_pca_set(swigCPtr, this, value);
  }

  public boolean getDo_pca() {
    return swigfaissJNI.ITQTransform_do_pca_get(swigCPtr, this);
  }

  public void setItq(ITQMatrix value) {
    swigfaissJNI.ITQTransform_itq_set(swigCPtr, this, ITQMatrix.getCPtr(value), value);
  }

  public ITQMatrix getItq() {
    long cPtr = swigfaissJNI.ITQTransform_itq_get(swigCPtr, this);
    return (cPtr == 0) ? null : new ITQMatrix(cPtr, false);
  }

  public void setMax_train_per_dim(int value) {
    swigfaissJNI.ITQTransform_max_train_per_dim_set(swigCPtr, this, value);
  }

  public int getMax_train_per_dim() {
    return swigfaissJNI.ITQTransform_max_train_per_dim_get(swigCPtr, this);
  }

  public void setPca_then_itq(LinearTransform value) {
    swigfaissJNI.ITQTransform_pca_then_itq_set(swigCPtr, this, LinearTransform.getCPtr(value), value);
  }

  public LinearTransform getPca_then_itq() {
    long cPtr = swigfaissJNI.ITQTransform_pca_then_itq_get(swigCPtr, this);
    return (cPtr == 0) ? null : new LinearTransform(cPtr, false);
  }

  public ITQTransform(int d_in, int d_out, boolean do_pca) {
    this(swigfaissJNI.new_ITQTransform__SWIG_0(d_in, d_out, do_pca), true);
  }

  public ITQTransform(int d_in, int d_out) {
    this(swigfaissJNI.new_ITQTransform__SWIG_1(d_in, d_out), true);
  }

  public ITQTransform(int d_in) {
    this(swigfaissJNI.new_ITQTransform__SWIG_2(d_in), true);
  }

  public ITQTransform() {
    this(swigfaissJNI.new_ITQTransform__SWIG_3(), true);
  }

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

  public void apply_noalloc(long n, SWIGTYPE_p_float x, SWIGTYPE_p_float xt) {
    swigfaissJNI.ITQTransform_apply_noalloc(swigCPtr, this, n, SWIGTYPE_p_float.getCPtr(x), SWIGTYPE_p_float.getCPtr(xt));
  }

}
