public class F1D extends DrawOptions implements Serializable
Operators and functions
the following operators are supported:
Constructor and Description |
---|
F1D(de.congrace.exp4j.ExpressionBuilder function,
double min,
double max)
Build a function.
|
F1D(hep.aida.IFunction iname)
Create a F1D function from JAIDA IFunction.
|
F1D(hep.aida.IFunction iname,
double min,
double max)
Create a F1D function from JAIDA IFunction.
|
F1D(String name)
Create a function in 1D for evaluation.
|
F1D(String name,
boolean parse)
Build a function.
|
F1D(String title,
double[] pars,
double min,
double max,
boolean parse)
Create a polynomial analytical function using a list of values.
|
F1D(String name,
double min,
double max)
Create a function in 1D.
|
F1D(String name,
double min,
double max,
boolean parsed)
Same function, but one can specify is it parsed or not.
|
F1D(String title,
de.congrace.exp4j.ExpressionBuilder function,
double min,
double max)
Create a function in 1D.
|
F1D(String title,
hep.aida.IFunction iname,
double min,
double max)
Create F1D function from JAIDA IFunction.
|
F1D(String title,
String name)
Create new function.
|
F1D(String title,
String name,
double min,
double max)
Create a function in 1D.
|
F1D(String title,
String name,
double min,
double max,
boolean parse)
Create a new function.
|
Modifier and Type | Method and Description |
---|---|
double[] |
differentiate(int N,
double min,
double max)
Numerical differentiation.
|
void |
doc()
Show online documentation.
|
boolean |
elementary()
Convert this function rewrite in term of elementary functions (log, exp,
frac, sqrt, implicit roots) This is useful before simplifying function.
|
void |
eval()
Evaluate a function for graphic representation.
|
double |
eval(double x)
Evaluate a function at a specific point in x
|
double[] |
eval(double[] x)
Evaluate a function for an array of x-values
|
void |
eval(double min,
double max)
Evaluate a function for graphic representation.
|
void |
eval(double min,
double max,
int Npoints)
Evaluate a function for graphic representation.
|
boolean |
expand()
Convert this function rewrite in expanded form.
|
boolean |
factorize()
Convert this function rewrite in factorized form (if can).
|
double[] |
getArrayX()
Get array of X-values after function after evaluation using the default
number of points
|
double[] |
getArrayY()
Get array of Y-values after function after evaluation using the default
number of points
|
String |
getException()
If error occurs at some step, this is the way to retrieve it.
|
H1D |
getH1D()
Return H1D histogram from F1D function.
|
H1D |
getH1D(String hname,
int bins,
double hmin,
double hmax)
Return a Histogram given by the F1D function.
|
hep.aida.IFunction |
getIFunction()
Get Jaida function
|
double |
getMax()
Get the maximum value in X
|
double |
getMin()
Get the minimum value in X
|
String |
getName()
Get the name of the function used for evaluation
|
de.congrace.exp4j.Calculable |
getParse()
Return parsed function.
|
int |
getPoints()
Get the number of points
|
double |
getX(int i)
Get value in X-axis
|
double |
getY(int i)
Get value in Y-axis
|
double |
integral(int N,
double min,
double max)
Numerical integration using trapezium rule.
|
double |
integral(String type,
int N,
double min,
double max)
Numerical integration.
|
boolean |
isParsed()
If the function is parsed correctly, return true.
|
boolean |
numeric()
Perform some numeric substitutions.
|
boolean |
parse()
Parse the function.
|
void |
setMax(double max)
Set the maximum value in X
|
void |
setMin(double min)
Set Min value in X
|
void |
setName(String name)
Sets a name of the function, i.e.
|
void |
setPar(String parameter,
double value)
Replace abstract parameter with the value (double).
|
void |
setPar(String parameter,
int value)
Replace abstract parameter with the value (integer).
|
void |
setPoints(int bins)
Sets the number points between Min and Max for evaluation
|
boolean |
simplify()
Try to simplify this function.
|
String |
toJava()
Convert the function into Java code.
|
String |
toMathML()
Convert the function into MathML form.
|
void |
toTable()
Print the F1D function to a Table in a separate Frame.
|
copyLinePars, getBinWidth, getColor, getDrawOption, getDrawOptions, getLegend, getLineParm, getLineStyle, getNameX, getNameY, getNameZ, getSymbol, getSymbolSize, getTitle, getType, isBars, isErrX, isErrY, isFilled, printDrawOptions, printDrawOptions, setBars, setBinWidth, setColor, setDrawLine, setDrawLineKey, setDrawOption, setDrawSymbol, setErr, setErrAll, setErrColor, setErrColor, setErrColorX, setErrColorY, setErrFill, setErrFillColor, setErrFillColor, setErrSys, setErrSysFill, setErrSysFillColor, setErrSysFillColor, setErrSysX, setErrSysY, setErrTicSize, setErrX, setErrY, setFill, setFillColor, setFillColorTransparency, setGraphStyle, setLegend, setLineStyle, setNameX, setNameY, setNameZ, setPenDash, setPenDash, setPenWidth, setPenWidthErr, setPenWidthErrSys, setStyle, setSymbol, setSymbolSize, setTitle, setType
public F1D(String name, double min, double max)
name
- String representing the function's definitionmin
- Min valuemax
- Max valuepublic F1D(String name, double min, double max, boolean parsed)
name
- Namemin
- Min valuemax
- Max valueparsed
- parsed or not.public F1D(String name)
Operators and functions
the following operators are supported:
name
- String representing the functionpublic F1D(String title, String name)
title
- titlename
- definitionpublic F1D(String title, String name, double min, double max, boolean parse)
Operators and functions
the following operators are supported:
title
- titlename
- definitionmin
- min valuemax
- max valueparse
- parset or notpublic F1D(String title, double[] pars, double min, double max, boolean parse)
title
- Title of this functionpars
- array of coefficients for polynomial functionmin
- Min value for evaluationmax
- Max value for evaluationparse
- set true if it should be parsedpublic F1D(String name, boolean parse)
Operators and functions
the following operators are supported:
name
- nameparse
- is parsed or not?public F1D(String title, de.congrace.exp4j.ExpressionBuilder function, double min, double max)
title
- Titlefunction
- ExpressionBuildermin
- Min valuemax
- Max valuepublic F1D(de.congrace.exp4j.ExpressionBuilder function, double min, double max)
function
- inputmin
- Min valuemax
- Max valuepublic F1D(String title, String name, double min, double max)
title
- String representing the titlename
- String representing the function's definitionmin
- Min valuemax
- Max valuepublic F1D(hep.aida.IFunction iname, double min, double max)
iname
- input IFunctionmin
- Min valuemax
- Max valuepublic F1D(hep.aida.IFunction iname)
iname
- input IFunctionpublic F1D(String title, hep.aida.IFunction iname, double min, double max)
title
- Titleiname
- input IFunctionmin
- Min X valuesmax
- Max X valuespublic boolean parse()
true
- if parsed OKpublic double eval(double x)
x
- value in x for evaluationpublic double[] eval(double[] x)
x
- array of values in x for evaluationpublic void eval(double min, double max)
Min
- value in xMax
- value in xpublic void eval(double min, double max, int Npoints)
Min
- value in xMax
- value in xNumber
- of evaluation pointspublic void eval()
public void doc()
public void toTable()
public void setPar(String parameter, double value)
parameter
- parameter namevalue
- value to be insertedpublic H1D getH1D()
public H1D getH1D(String hname, int bins, double hmin, double hmax)
hname
- Name of the histogrambins
- number of bins for histogramhmin
- min value of histogramhmax
- max value of histogrampublic void setPar(String parameter, int value)
parameter
- parameter namevalue
- integer value to be inserted.public double getX(int i)
i
- indexpublic double getY(int i)
i
- indexpublic void setName(String name)
name
- Namepublic String getName()
public de.congrace.exp4j.Calculable getParse()
public void setMin(double min)
min
- Minimum valuepublic double getMin()
public void setMax(double max)
max
- Maximal valuepublic double getMax()
public void setPoints(int bins)
bins
- Number of pointspublic double integral(String type, int N, double min, double max)
type
- type of algorithm. Can be:
"gauss4","gauss8","richardson","simpson","trapezium".N
- the number of strips to use for integrationmin
- the first ordinate.max
- the last ordinate.public double integral(int N, double min, double max)
N
- the number of strips to use for integrationmin
- the first ordinate.max
- the last ordinate.public hep.aida.IFunction getIFunction()
public double[] getArrayX()
public double[] getArrayY()
public boolean isParsed()
public String toMathML()
public String toJava()
public boolean simplify()
public boolean elementary()
public boolean expand()
public boolean factorize()
public boolean numeric()
public double[] differentiate(int N, double min, double max)
N
- the number of points to use.min
- the first ordinate.max
- the last ordinate.public int getPoints()
public String getException()
SCaVis 1.0 ©