FreeHEP API
Version current

hep.aida.ref.fitter.fitMethod
Class AbstractFitMethod

java.lang.Object
  extended byhep.aida.ref.fitter.fitMethod.AbstractFitMethod
All Implemented Interfaces:
IFitMethod
Direct Known Subclasses:
BinnedMaximumLikelihoodFitMethod, ChiSquaredFitMethod, CleverChiSquaredFitMethod, LeastSquaresFitMethod, UnbinnedMaximumLikelihoodFitMethod

public abstract class AbstractFitMethod
extends Object
implements IFitMethod

Author:
The AIDA team @ SLAC. Default implementation of IFitMethod. This class provides the default implementation of the evaluate(..) method. This is the sum, over the data of evaluateSumElement(...). Most classes extending this class should only implement the evaluateSumElement(...) method unless efficiency is gained by overwriting the evaluate(...) method.
Source Code:
AbstractFitMethod.java

Field Summary
 
Fields inherited from interface hep.aida.ext.IFitMethod
BINNED_FIT, UNBINNED_FIT
 
Constructor Summary
AbstractFitMethod(int fitType, String[] fitMethodNames)
           
 
Method Summary
 void clear()
          Clear the fitMethod.
 Object correlationObject()
          Get the correlation object.
 double evaluate(hep.aida.dev.IDevFitDataIterator dataIter, hep.aida.IFunction function)
          Evaluate the Objective Function for a given data iterator and a given function.
 double[] evaluateGradient(int dimension, hep.aida.dev.IDevFitDataIterator dataIter, hep.aida.IFunction function)
          Evaluate the gradient of the Objective Function.
 String[] fitMethodNames()
          Get the names for this fit method.
 int fitType()
          Return the fit type: BINNED_FIT if it is a binned fit, UNBINNED_FIT if unbinned.
 void setCorrelationObject(Object correlationObj)
          Set the correlation object among the data.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface hep.aida.ext.IFitMethod
evaluateGradientSumElement, evaluateSumElement
 

Constructor Detail

AbstractFitMethod

public AbstractFitMethod(int fitType,
                         String[] fitMethodNames)
Method Detail

fitType

public int fitType()
Description copied from interface: IFitMethod
Return the fit type: BINNED_FIT if it is a binned fit, UNBINNED_FIT if unbinned.

Specified by:
fitType in interface IFitMethod

fitMethodNames

public String[] fitMethodNames()
Description copied from interface: IFitMethod
Get the names for this fit method. The first one in the array is the default. The array cannot be null. It must have at least one name.

Specified by:
fitMethodNames in interface IFitMethod

evaluateGradient

public double[] evaluateGradient(int dimension,
                                 hep.aida.dev.IDevFitDataIterator dataIter,
                                 hep.aida.IFunction function)
Description copied from interface: IFitMethod
Evaluate the gradient of the Objective Function.

Specified by:
evaluateGradient in interface IFitMethod

evaluate

public double evaluate(hep.aida.dev.IDevFitDataIterator dataIter,
                       hep.aida.IFunction function)
Description copied from interface: IFitMethod
Evaluate the Objective Function for a given data iterator and a given function.

Specified by:
evaluate in interface IFitMethod

setCorrelationObject

public void setCorrelationObject(Object correlationObj)
Description copied from interface: IFitMethod
Set the correlation object among the data.

Specified by:
setCorrelationObject in interface IFitMethod

clear

public void clear()
Description copied from interface: IFitMethod
Clear the fitMethod. This method is invoked before the function is evaluated.

Specified by:
clear in interface IFitMethod

correlationObject

public Object correlationObject()
Description copied from interface: IFitMethod
Get the correlation object.

Specified by:
correlationObject in interface IFitMethod

FreeHEP API
Version current

Copyright © 2000-2004 FreeHEP, All Rights Reserved.