// AID-GENERATED
// =========================================================================
// This class was generated by AID - Abstract Interface Definition          
// DO NOT MODIFY, but use the org.freehep.aid.Aid utility to regenerate it. 
// =========================================================================

package hep.aida.dev;


/**
 *
 * Iterator for the fit data allows to decouple abstract representation of data
 * and independently traverse the data in the inner fitting loop.
 *
 * @author The AIDA team.
 * 
 * @stereotype developer
 *
 */


public interface IDevFitDataIterator {

    /**
     * Position the iterator at the start. The starting position
     * is right before the first element.
     *
     */
    public void start();

    /**
     * Move the iterator to the next element of the IFitData.
     * @return true If the iterator is positioned on a
     *         valide element.
     *
     */
    public boolean next();

    /**
     * Get the total number of entries on which the
     * iterator is supposed to loop on. This is needed to calculate the Chi2 of a fit.
     * @return The total number of entries.
     *
     */
    public int entries();

    /**
     * Get the array containing the variables for
     * the current data element. The variables should
     * be already in the right order for the value() method
     * of the IFunction.
     * @return The array of variables for the current data element.
     *
     */
    public double[] vars();

    /**
     * For Chi2-type fits it returns the "height" for evaluating
     * the contribution to the chi2 for the current element.
     * @return The value for the current element.
     * @throws RuntimeException if the value is not available, like in 
     *         unbinned-type fits.
     *
     */
    public double value() throws RuntimeException;

    /**
     * For Chi2-type fits it returns the error for the current element for the
     * evaluation of the chi2 contribution of the current element.
     * If the IFitData provides asymmetric errors it returns the positive error.
     * @return The error for the current element.
     * @throws RuntimeException if the error is not available, like in 
     *         unbinned-type fits.
     *
     */
    public double error() throws RuntimeException;

    /**
     * If the IFitData provides asymmetric errors it returns
     * the negative error on the current element. Otherwise it
     * returns the same value returned by the method error().
     * @return The minus error.
     * @throws RuntimeException if the error is not available, like in 
     *         unbinned-type fits.
     *
     */
    public double minusError() throws RuntimeException;
} // class or interface


 

Ads help maintain this website.