/* ---------------------------------------------------------------------------- * 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 IFitter implements hep.aida.IFitter { private long swigCPtr; protected boolean swigCMemOwn; public IFitter(long cPtr, boolean cMemoryOwn) { swigCMemOwn = cMemoryOwn; swigCPtr = cPtr; } protected static long getCPtr(hep.aida.IFitter obj) { if (obj instanceof IFitter) { return (obj == null) ? 0 : ((IFitter)obj).swigCPtr; } else { long cPtr = AIDAJNI.new_IFitter(); // FIXME, memory leak if Java class gets finalized, since C++ director is not freed. AIDAJNI.IFitter_director_connect(obj, cPtr, true, true); return cPtr; } } protected void finalize() { delete(); } public synchronized void delete() { if(swigCPtr != 0 && swigCMemOwn) { swigCMemOwn = false; AIDAJNI.delete_IFitter(swigCPtr); } swigCPtr = 0; } protected void swigDirectorDisconnect() { swigCMemOwn = false; delete(); } public void swigReleaseOwnership() { swigCMemOwn = false; AIDAJNI.IFitter_change_ownership(this, swigCPtr, false); } public void swigTakeOwnership() { swigCMemOwn = true; AIDAJNI.IFitter_change_ownership(this, swigCPtr, true); } public hep.aida.IFitResult fit(hep.aida.IFitData fitData, hep.aida.IFunction func) { long cPtr = AIDAJNI.IFitter_fit__SWIG_0(swigCPtr, this, IFitData.getCPtr(fitData), (hep.aida.IFitData)fitData, IFunction.getCPtr(func), (hep.aida.IFunction)func); return (cPtr == 0) ? null : new IFitResult(cPtr, false); } public hep.aida.IFitResult fit(hep.aida.IBaseHistogram hist, hep.aida.IFunction func) { long cPtr = AIDAJNI.IFitter_fit__SWIG_1(swigCPtr, this, IBaseHistogram.getCPtr(hist), (hep.aida.IBaseHistogram)hist, IFunction.getCPtr(func), (hep.aida.IFunction)func); return (cPtr == 0) ? null : new IFitResult(cPtr, false); } public hep.aida.IFitResult fit(hep.aida.IBaseHistogram hist, String model) { long cPtr = AIDAJNI.IFitter_fit__SWIG_2(swigCPtr, this, IBaseHistogram.getCPtr(hist), (hep.aida.IBaseHistogram)hist, model); return (cPtr == 0) ? null : new IFitResult(cPtr, false); } public hep.aida.IFitResult fit(hep.aida.IBaseHistogram hist, String model, double[] initialParameters) { long cPtr = AIDAJNI.IFitter_fit__SWIG_3(swigCPtr, this, IBaseHistogram.getCPtr(hist), (hep.aida.IBaseHistogram)hist, model, initialParameters); return (cPtr == 0) ? null : new IFitResult(cPtr, false); } public hep.aida.IFitResult fit(hep.aida.IDataPointSet dataPointSet, hep.aida.IFunction f) { long cPtr = AIDAJNI.IFitter_fit__SWIG_4(swigCPtr, this, IDataPointSet.getCPtr(dataPointSet), (hep.aida.IDataPointSet)dataPointSet, IFunction.getCPtr(f), (hep.aida.IFunction)f); return (cPtr == 0) ? null : new IFitResult(cPtr, false); } public hep.aida.IFitResult fit(hep.aida.IDataPointSet dataPointSet, String model) { long cPtr = AIDAJNI.IFitter_fit__SWIG_5(swigCPtr, this, IDataPointSet.getCPtr(dataPointSet), (hep.aida.IDataPointSet)dataPointSet, model); return (cPtr == 0) ? null : new IFitResult(cPtr, false); } public hep.aida.IFitResult fit(hep.aida.IDataPointSet dataPointSet, String model, double[] initialParameters) { long cPtr = AIDAJNI.IFitter_fit__SWIG_6(swigCPtr, this, IDataPointSet.getCPtr(dataPointSet), (hep.aida.IDataPointSet)dataPointSet, model, initialParameters); return (cPtr == 0) ? null : new IFitResult(cPtr, false); } public hep.aida.IFitResult fit(hep.aida.IFitData d, String model) { long cPtr = AIDAJNI.IFitter_fit__SWIG_7(swigCPtr, this, IFitData.getCPtr(d), (hep.aida.IFitData)d, model); return (cPtr == 0) ? null : new IFitResult(cPtr, false); } public hep.aida.IFitResult fit(hep.aida.IFitData d, String model, double[] initialParameters) { long cPtr = AIDAJNI.IFitter_fit__SWIG_8(swigCPtr, this, IFitData.getCPtr(d), (hep.aida.IFitData)d, model, initialParameters); return (cPtr == 0) ? null : new IFitResult(cPtr, false); } public void setEngine(String name) { AIDAJNI.IFitter_setEngine(swigCPtr, this, name); } public String engineName() { return AIDAJNI.IFitter_engineName(swigCPtr, this); } public hep.aida.IFitParameterSettings fitParameterSettings(String name) { return new IFitParameterSettings(AIDAJNI.IFitter_fitParameterSettings(swigCPtr, this, name), false); } public String[] listParameterSettings() { return AIDAJNIUtil.toStringArray(AIDAJNI.IFitter_listParameterSettings(swigCPtr, this)); } public void resetParameterSettings() { AIDAJNI.IFitter_resetParameterSettings(swigCPtr, this); } public void setConstraint(String expr) { AIDAJNI.IFitter_setConstraint(swigCPtr, this, expr); } public String[] constraints() { return AIDAJNIUtil.toStringArray(AIDAJNI.IFitter_constraints(swigCPtr, this)); } public void resetConstraints() { AIDAJNI.IFitter_resetConstraints(swigCPtr, this); } public void setFitMethod(String name) { AIDAJNI.IFitter_setFitMethod(swigCPtr, this, name); } public String fitMethodName() { return AIDAJNI.IFitter_fitMethodName(swigCPtr, this); } public hep.aida.IDataPointSet createScan1D(hep.aida.IFitData d, hep.aida.IFunction f, String par, int npts, double pmin, double pmax) { long cPtr = AIDAJNI.IFitter_createScan1D(swigCPtr, this, IFitData.getCPtr(d), (hep.aida.IFitData)d, IFunction.getCPtr(f), (hep.aida.IFunction)f, par, npts, pmin, pmax); return (cPtr == 0) ? null : new IDataPointSet(cPtr, false); } public hep.aida.IDataPointSet createContour(hep.aida.IFitData d, hep.aida.IFitResult r, String par1, String par2, int npts, double up) { long cPtr = AIDAJNI.IFitter_createContour(swigCPtr, this, IFitData.getCPtr(d), (hep.aida.IFitData)d, IFitResult.getCPtr(r), (hep.aida.IFitResult)r, par1, par2, npts, up); return (cPtr == 0) ? null : new IDataPointSet(cPtr, false); } public void setUseFunctionGradient(boolean useGrad) { AIDAJNI.IFitter_setUseFunctionGradient(swigCPtr, this, useGrad); } public boolean useFunctionGradient() { return AIDAJNI.IFitter_useFunctionGradient(swigCPtr, this); } public IFitter() { this(AIDAJNI.new_IFitter(), true); AIDAJNI.IFitter_director_connect(this, swigCPtr, swigCMemOwn, true); } }