/* ---------------------------------------------------------------------------- * 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 IModelFunction extends IFunction implements hep.aida.IModelFunction { private long swigCPtr; public IModelFunction(long cPtr, boolean cMemoryOwn) { super(AIDAJNI.SWIGIModelFunctionUpcast(cPtr), cMemoryOwn); swigCPtr = cPtr; } protected static long getCPtr(hep.aida.IModelFunction obj) { if (obj instanceof IModelFunction) { return (obj == null) ? 0 : ((IModelFunction)obj).swigCPtr; } else { long cPtr = AIDAJNI.new_IModelFunction(); // FIXME, memory leak if Java class gets finalized, since C++ director is not freed. AIDAJNI.IModelFunction_director_connect(obj, cPtr, true, true); return cPtr; } } protected void finalize() { delete(); } public synchronized void delete() { if(swigCPtr != 0 && swigCMemOwn) { swigCMemOwn = false; AIDAJNI.delete_IModelFunction(swigCPtr); } swigCPtr = 0; super.delete(); } protected void swigDirectorDisconnect() { swigCMemOwn = false; delete(); } public void swigReleaseOwnership() { swigCMemOwn = false; AIDAJNI.IModelFunction_change_ownership(this, swigCPtr, false); } public void swigTakeOwnership() { swigCMemOwn = true; AIDAJNI.IModelFunction_change_ownership(this, swigCPtr, true); } public boolean providesNormalization() { return AIDAJNI.IModelFunction_providesNormalization(swigCPtr, this); } public void normalize(boolean on) { AIDAJNI.IModelFunction_normalize(swigCPtr, this, on); } public boolean isNormalized() { return AIDAJNI.IModelFunction_isNormalized(swigCPtr, this); } public double[] parameterGradient(double[] x) { return AIDAJNI.IModelFunction_parameterGradient(swigCPtr, this, x); } public boolean providesParameterGradient() { return AIDAJNI.IModelFunction_providesParameterGradient(swigCPtr, this); } public hep.aida.IRangeSet normalizationRange(int iAxis) { return new IRangeSet(AIDAJNI.IModelFunction_normalizationRange(swigCPtr, this, iAxis), false); } public void includeNormalizationAll() { AIDAJNI.IModelFunction_includeNormalizationAll(swigCPtr, this); } public void excludeNormalizationAll() { AIDAJNI.IModelFunction_excludeNormalizationAll(swigCPtr, this); } public IModelFunction() { this(AIDAJNI.new_IModelFunction(), true); AIDAJNI.IModelFunction_director_connect(this, swigCPtr, swigCMemOwn, true); } }