hep.aida.ref.fitter
Class InternalFitFunction
- java.lang.Object
-
- hep.aida.ref.fitter.InternalFitFunction
-
-
Constructor Summary
Constructors Constructor and Description InternalFitFunction(IDevFitDataIterator dataIterator, IModelFunction func, IFitMethod fitMethod)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description IAnnotationannotation()java.lang.StringcodeletString()String describing the metatype and implementation of the function.intdimension()Dimensionality of the domain space.double[]gradient(double[] x)Gradient of the function.intindexOfParameter(java.lang.String name)Return -1 if parameter not found (name undefined).booleanisEqual(IFunction f)Compare if functions are the same.java.lang.StringnormalizationParameter()Returns the name of the normalization parameter if the function has one.intnumberOfParameters()Number of parameters.doubleparameter(java.lang.String name)java.lang.String[]parameterNames()Names of paramaters.double[]parameters()Retrieve current vector of parameters.booleanprovidesGradient()Determine whether function is able to compute gradient.voidsetParameter(java.lang.String name, double x)Set parameter's value by name.voidsetParameters(double[] params)Set new vector of parameters.voidsetTitle(java.lang.String str)Set the histogram title.java.lang.Stringtitle()Get the Function's title.doublevalue(double[] x)Scalar value of the function.java.lang.StringvariableName(int i)Get the symbolic name of i-th variable.java.lang.String[]variableNames()Get all the names in a vector.
-
-
-
Constructor Detail
-
InternalFitFunction
public InternalFitFunction(IDevFitDataIterator dataIterator, IModelFunction func, IFitMethod fitMethod)
-
-
Method Detail
-
dimension
public int dimension()
Description copied from interface:IFunctionDimensionality of the domain space.
-
value
public double value(double[] x)
Description copied from interface:IFunctionScalar value of the function.
-
providesGradient
public boolean providesGradient()
Description copied from interface:IFunctionDetermine whether function is able to compute gradient.- Specified by:
providesGradientin interfaceIFunction
-
variableName
public java.lang.String variableName(int i)
Description copied from interface:IFunctionGet the symbolic name of i-th variable.- Specified by:
variableNamein interfaceIFunction
-
variableNames
public java.lang.String[] variableNames()
Description copied from interface:IFunctionGet all the names in a vector.- Specified by:
variableNamesin interfaceIFunction
-
numberOfParameters
public int numberOfParameters()
Description copied from interface:IFunctionNumber of parameters.- Specified by:
numberOfParametersin interfaceIFunction
-
gradient
public double[] gradient(double[] x)
Description copied from interface:IFunctionGradient of the function. The result is valid only if providesGradient()==true. Otherwise the result is some default (empty) vector.
-
isEqual
public boolean isEqual(IFunction f)
Description copied from interface:IFunctionCompare if functions are the same. PENDING: define exactly what it means ;)
-
annotation
public IAnnotation annotation()
- Specified by:
annotationin interfaceIFunction
-
codeletString
public java.lang.String codeletString()
Description copied from interface:IFunctionString describing the metatype and implementation of the function. Generic format of the string: codelet:TYPE:LOCATION TYPE part contains only a 'typename' string which is a metatype identifier (used in plugins and catalogues) LOCATION may be: 'file', 'verbatim', or 'catalogue' Detailed description: codelet:typename - no location specified (using 'catalogue') codelet:typename:file:/filename.cpp - a c++ source file codelet:typename:file:/filename.py - a python source file codelet:typename:file:/filename.so - a shared library codelet:typename:catalogue - entry in a catalogue repository codelet:typename:verbatim:cpp \n - c++ source file included verbatim after \n codelet:typename:verbatim:py \n - python source file included verbatim aftern \n Comments: file:/filename is a relative path to $AIDA_FUNCTION_DEFAULT_DIR file://filename is an absolute path Examples: codelet:G:catalogue codelet:userSinus:verbatim:cpp \n { return sin(x); }- Specified by:
codeletStringin interfaceIFunction
-
setParameters
public void setParameters(double[] params)
Description copied from interface:IFunctionSet new vector of parameters.- Specified by:
setParametersin interfaceIFunction
-
parameters
public double[] parameters()
Description copied from interface:IFunctionRetrieve current vector of parameters.- Specified by:
parametersin interfaceIFunction
-
indexOfParameter
public int indexOfParameter(java.lang.String name)
Description copied from interface:IFunctionReturn -1 if parameter not found (name undefined). Leave it because there are use cases - some users prefer to use numbers.- Specified by:
indexOfParameterin interfaceIFunction
-
parameterNames
public java.lang.String[] parameterNames()
Description copied from interface:IFunctionNames of paramaters. Names should be unique. Case-insensitive for comparison. Case-sensitive for storage and output. All or several names may be left blank "" if the implementation does not want to provide them.- Specified by:
parameterNamesin interfaceIFunction
-
setParameter
public void setParameter(java.lang.String name, double x)Description copied from interface:IFunctionSet parameter's value by name.- Specified by:
setParameterin interfaceIFunction- Parameters:
name- The name of the parameter.x- The new value of the parameter.
-
parameter
public double parameter(java.lang.String name)
-
setTitle
public void setTitle(java.lang.String str)
Description copied from interface:IFunctionSet the histogram title.
-
title
public java.lang.String title()
Description copied from interface:IFunctionGet the Function's title.
-
normalizationParameter
public java.lang.String normalizationParameter()
Description copied from interface:IFunctionReturns the name of the normalization parameter if the function has one.- Specified by:
normalizationParameterin interfaceIFunction- Returns:
- The name of the normalization parameter.null if no such parameter is available
-
-
DMelt 3.0 © DataMelt by jWork.ORG