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

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

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

  public void setMap(IntVector value) {
    swigfaissJNI.RemapDimensionsTransform_map_set(swigCPtr, this, IntVector.getCPtr(value), value);
  }

  public IntVector getMap() {
    long cPtr = swigfaissJNI.RemapDimensionsTransform_map_get(swigCPtr, this);
    return (cPtr == 0) ? null : new IntVector(cPtr, false);
  }

  public RemapDimensionsTransform(int d_in, int d_out, SWIGTYPE_p_int map) {
    this(swigfaissJNI.new_RemapDimensionsTransform__SWIG_0(d_in, d_out, SWIGTYPE_p_int.getCPtr(map)), true);
  }

  public RemapDimensionsTransform(int d_in, int d_out, boolean uniform) {
    this(swigfaissJNI.new_RemapDimensionsTransform__SWIG_1(d_in, d_out, uniform), true);
  }

  public RemapDimensionsTransform(int d_in, int d_out) {
    this(swigfaissJNI.new_RemapDimensionsTransform__SWIG_2(d_in, d_out), true);
  }

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

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

  public RemapDimensionsTransform() {
    this(swigfaissJNI.new_RemapDimensionsTransform__SWIG_3(), true);
  }

}
