jas2.hist
Class Fittable1DFunction
- java.lang.Object
-
- java.util.Observable
-
- jas2.hist.Basic1DFunction
-
- jas2.hist.Fittable1DFunction
-
- All Implemented Interfaces:
- DataSource, ExtendedStatistics, FunctionData, HasStatistics, Statistics, java.io.Serializable
- Direct Known Subclasses:
- CubicFunction, ExponentialFunction, FunctionData1DWithType, GaussianFunction, LandauFunction, LorentzianFunction, PolynomialFunction, PowerLawFunction, QuadraticFunction, StraightLineFunction
public abstract class Fittable1DFunction extends Basic1DFunction implements ExtendedStatistics
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor and Description Fittable1DFunction()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method and Description voidclearFit()voidclearFitParams()double[]getDerivatives(double x, double[] a)Calculates the partial derivative of the function with respect to each parameter at point x.java.lang.ObjectgetExtendedStatistic(java.lang.String name)Returns an object corresponding to the named statistic.FittergetFit()boolean[]getIncludeParametersInFit()doublegetStatistic(java.lang.String name)java.lang.String[]getStatisticNames()abstract voidsetFit(Fitter fit, double[] param)voidsetIncludeParameterInFit(int index, boolean value)abstract doublevalueAt(double x, double[] param)-
Methods inherited from class jas2.hist.Basic1DFunction
getStatistics, setBatch, setChanged, setChanged
-
Methods inherited from class java.util.Observable
addObserver, countObservers, deleteObserver, deleteObservers, hasChanged, notifyObservers, notifyObservers
-
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface jas2.hist.FunctionData
getParameterNames, getParameterValues, setParameter, valueAt
-
Methods inherited from interface jas2.hist.DataSource
getTitle
-
-
-
-
Method Detail
-
valueAt
public abstract double valueAt(double x, double[] param) throws FunctionValueUndefined- Throws:
FunctionValueUndefined
-
setFit
public abstract void setFit(Fitter fit, double[] param) throws InvalidFunctionParameter
- Throws:
InvalidFunctionParameter
-
getIncludeParametersInFit
public boolean[] getIncludeParametersInFit()
-
clearFitParams
public void clearFitParams()
-
setIncludeParameterInFit
public void setIncludeParameterInFit(int index, boolean value)
-
getDerivatives
public double[] getDerivatives(double x, double[] a) throws FunctionValueUndefinedCalculates the partial derivative of the function with respect to each parameter at point x. This is a non-analytical calculation which can be overriden by subclasses which wish to provide an analytical calculation- Throws:
FunctionValueUndefined- if the function is not defined forx
-
getFit
public Fitter getFit()
-
clearFit
public void clearFit()
-
getStatisticNames
public java.lang.String[] getStatisticNames()
- Specified by:
getStatisticNamesin interfaceStatistics- Overrides:
getStatisticNamesin classBasic1DFunction- Returns:
- A list of statistic names
-
getStatistic
public double getStatistic(java.lang.String name)
- Specified by:
getStatisticin interfaceStatistics- Overrides:
getStatisticin classBasic1DFunction- Returns:
- The value for the statistic
-
getExtendedStatistic
public java.lang.Object getExtendedStatistic(java.lang.String name)
Description copied from interface:ExtendedStatisticsReturns an object corresponding to the named statistic. In general the statistic will be displayed by calling its toString method, however if a Format object has been defined for this class (how?) then it will be used instead. By default the following formatters are defined- java.lang.Double
- jas2.util.ScientificFormat
- jas2.util.DoubleWithError
- jas2.util.ScientificFormat
- Specified by:
getExtendedStatisticin interfaceExtendedStatistics- Parameters:
name- The name of the statistic to return- See Also:
ScientificFormat,DoubleWithError
-
-
DataMelt 3.0 © DataMelt by jWork.ORG