/* ----------------------------------------------------------------------------
 * This file was automatically generated by SWIG (http://www.swig.org).
 * Version 1.3.31
 *
 * Do not make changes to this file unless you know what you are doing--modify
 * the SWIG interface file instead.
 * ----------------------------------------------------------------------------- */

package hep.aida.swig;
 
import hep.aida.jni.AIDAJNIUtil;

public class IHistogram3D extends IHistogram implements hep.aida.IHistogram3D {
  private long swigCPtr;

  public IHistogram3D(long cPtr, boolean cMemoryOwn) {
    super(AIDAJNI.SWIGIHistogram3DUpcast(cPtr), cMemoryOwn);
    swigCPtr = cPtr;
  }

  protected static long getCPtr(hep.aida.IHistogram3D obj) {
    if (obj instanceof IHistogram3D) {
      return (obj == null) ? 0 : ((IHistogram3D)obj).swigCPtr;
    } else {
      long cPtr = AIDAJNI.new_IHistogram3D();
      // FIXME, memory leak if Java class gets finalized, since C++ director is not freed.
      AIDAJNI.IHistogram3D_director_connect(obj, cPtr, true, true);
      return cPtr;
    }
  }

  protected void finalize() {
    delete();
  }

  public synchronized void delete() {
    if(swigCPtr != 0 && swigCMemOwn) {
      swigCMemOwn = false;
      AIDAJNI.delete_IHistogram3D(swigCPtr);
    }
    swigCPtr = 0;
    super.delete();
  }

  protected void swigDirectorDisconnect() {
    swigCMemOwn = false;
    delete();
  }

  public void swigReleaseOwnership() {
    swigCMemOwn = false;
    AIDAJNI.IHistogram3D_change_ownership(this, swigCPtr, false);
  }

  public void swigTakeOwnership() {
    swigCMemOwn = true;
    AIDAJNI.IHistogram3D_change_ownership(this, swigCPtr, true);
  }

  public void fill(double x, double y, double z, double weight) {
    AIDAJNI.IHistogram3D_fill__SWIG_0(swigCPtr, this, x, y, z, weight);
  }

  public void fill(double x, double y, double z) {
    AIDAJNI.IHistogram3D_fill__SWIG_1(swigCPtr, this, x, y, z);
  }

  public double binMeanX(int indexX, int indexY, int indexZ) {
    return AIDAJNI.IHistogram3D_binMeanX(swigCPtr, this, indexX, indexY, indexZ);
  }

  public double binMeanY(int indexX, int indexY, int indexZ) {
    return AIDAJNI.IHistogram3D_binMeanY(swigCPtr, this, indexX, indexY, indexZ);
  }

  public double binMeanZ(int indexX, int indexY, int indexZ) {
    return AIDAJNI.IHistogram3D_binMeanZ(swigCPtr, this, indexX, indexY, indexZ);
  }

  public int binEntries(int indexX, int indexY, int indexZ) {
    return AIDAJNI.IHistogram3D_binEntries(swigCPtr, this, indexX, indexY, indexZ);
  }

  public int binEntriesX(int index) {
    return AIDAJNI.IHistogram3D_binEntriesX(swigCPtr, this, index);
  }

  public int binEntriesY(int index) {
    return AIDAJNI.IHistogram3D_binEntriesY(swigCPtr, this, index);
  }

  public int binEntriesZ(int index) {
    return AIDAJNI.IHistogram3D_binEntriesZ(swigCPtr, this, index);
  }

  public double binHeight(int indexX, int indexY, int indexZ) {
    return AIDAJNI.IHistogram3D_binHeight(swigCPtr, this, indexX, indexY, indexZ);
  }

  public double binHeightX(int index) {
    return AIDAJNI.IHistogram3D_binHeightX(swigCPtr, this, index);
  }

  public double binHeightY(int index) {
    return AIDAJNI.IHistogram3D_binHeightY(swigCPtr, this, index);
  }

  public double binHeightZ(int index) {
    return AIDAJNI.IHistogram3D_binHeightZ(swigCPtr, this, index);
  }

  public double binError(int indexX, int indexY, int indexZ) {
    return AIDAJNI.IHistogram3D_binError(swigCPtr, this, indexX, indexY, indexZ);
  }

  public double meanX() {
    return AIDAJNI.IHistogram3D_meanX(swigCPtr, this);
  }

  public double meanY() {
    return AIDAJNI.IHistogram3D_meanY(swigCPtr, this);
  }

  public double meanZ() {
    return AIDAJNI.IHistogram3D_meanZ(swigCPtr, this);
  }

  public double rmsX() {
    return AIDAJNI.IHistogram3D_rmsX(swigCPtr, this);
  }

  public double rmsY() {
    return AIDAJNI.IHistogram3D_rmsY(swigCPtr, this);
  }

  public double rmsZ() {
    return AIDAJNI.IHistogram3D_rmsZ(swigCPtr, this);
  }

  public hep.aida.IAxis xAxis() {
    return new IAxis(AIDAJNI.IHistogram3D_xAxis(swigCPtr, this), false);
  }

  public hep.aida.IAxis yAxis() {
    return new IAxis(AIDAJNI.IHistogram3D_yAxis(swigCPtr, this), false);
  }

  public hep.aida.IAxis zAxis() {
    return new IAxis(AIDAJNI.IHistogram3D_zAxis(swigCPtr, this), false);
  }

  public int coordToIndexX(double coord) {
    return AIDAJNI.IHistogram3D_coordToIndexX(swigCPtr, this, coord);
  }

  public int coordToIndexY(double coord) {
    return AIDAJNI.IHistogram3D_coordToIndexY(swigCPtr, this, coord);
  }

  public int coordToIndexZ(double coord) {
    return AIDAJNI.IHistogram3D_coordToIndexZ(swigCPtr, this, coord);
  }

  public void add(hep.aida.IHistogram3D hist) {
    AIDAJNI.IHistogram3D_add(swigCPtr, this, IHistogram3D.getCPtr(hist), (hep.aida.IHistogram3D)hist);
  }

  public IHistogram3D() {
    this(AIDAJNI.new_IHistogram3D(), true);
    AIDAJNI.IHistogram3D_director_connect(this, swigCPtr, swigCMemOwn, true);
  }

}
