public class F1D extends DrawOptions
Operators and functions
the following operators are supported:
Constructor and Description |
---|
F1D(Expression calc)
Create a function in 1D.
|
F1D(ExpressionBuilder function)
Build a function.
|
F1D(Expression calc,
double min,
double max)
Create a function from the expression.
|
F1D(FProxy f)
Initialize function from proxy.
|
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 in ranges.
|
F1D(String name)
Create a function in 1D.
|
F1D(String name,
boolean parse)
Build a function.
|
F1D(String title,
double[] pars,
boolean parse)
Create a polynomial analytical function using a list of values.
|
F1D(String name,
double min,
double max)
Create a new function in pre-defined range for plotting.
|
F1D(String name,
double min,
double max,
boolean parsed)
Define a ranged function.
|
F1D(String title,
Expression calc)
Create a function in 1D.
|
F1D(String title,
ExpressionBuilder function)
Create a function in 1D.
|
F1D(String title,
Expression calc,
double min,
double max)
Create a function in 1D.
|
F1D(String title,
hep.aida.IFunction iname)
Create F1D function from JAIDA IFunction.
|
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,
boolean parsed)
Create a new function in pre-defined range for plotting.
|
F1D(String title,
String name,
double min,
double max)
Create a new function.
|
F1D(String title,
String name,
double min,
double max,
boolean parse)
Create a new function.
|
Modifier and Type | Method and Description |
---|---|
double[] |
differentiate()
Numerical differentiation of a function.
|
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 xMin,
double xMax)
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).
|
FProxy |
get()
Get the proxy of this function used for serialization and non-graphical
representations.
|
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(double min,
double max)
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
|
Expression |
getParse()
Return parsed function.
|
int |
getPoints()
Get the number of points used for plotting, integration and
differentiation.
|
double |
getX(int i)
Get value in X-axis
|
double |
getY(int i)
Get value in Y-axis
|
double |
integral()
Integral using fastest trapezium rule method.
|
double |
integral(double min,
double max)
Integral using fastest trapezium rule method.
|
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 |
set(FProxy f)
Set proxy 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.
|
String |
toString()
Get this function as a string.
|
void |
toTable()
Print the F1D function to a Table in a separate Frame.
|
copyLinePars, getBinWidth, getColor, getDrawOption, getDrawOptions, getFillColor, getLegend, getLineParm, getLineStyle, getNameX, getNameY, getNameZ, getPenWidth, getSymbol, getSymbolShape, 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, setSymbol, setSymbolSize, setTitle, setType
public F1D(String name)
A function can be ranged (range min and max is included) or unranged (min
and max are not defined). Ranged function determines the plot ranges,
integration range etc.
The function may have one independent variable: x. Example: x*x
Operators and functions
the following operators are supported:
name
- String representing the function's definitionpublic F1D(FProxy f)
f
- public F1D(String title, String name)
title
- titlename
- definitionpublic F1D(String title, String name, double min, double max)
Operators and functions
the following operators are supported:
title
- titlename
- definitionmin
- minimum value for plottingmax
- maximum value for plottingpublic F1D(String name, double min, double max, boolean parsed)
name
- namemin
- min valuemax
- max valueparsed
- is parsed?public F1D(String title, hep.aida.IFunction iname, double min, double max)
title
- Titleiname
- input IFunctionmin
- Min X valuesmax
- Max X valuespublic F1D(String title, String name, double min, double max, boolean parse)
Operators and functions
the following operators are supported:
title
- titlename
- definitionmin
- minimum value for plottingmax
- maximum value for plottingparse
- parse or not. Do not parse when using parameters.public F1D(hep.aida.IFunction iname, double min, double max)
iname
- input IFunctionmin
- Min valuemax
- Max valuepublic F1D(String name, double min, double max)
Operators and functions
the following operators are supported:
name
- definitionmin
- min value for plottingmax
- max value for plottingparse
- parse or not. Do not parse when using parameters.public F1D(String title, String name, boolean parsed)
Operators and functions
the following operators are supported:
title
- titlename
- definitionparse
- parse or not. Do not parse when using parameters.public F1D(String title, double[] pars, boolean parse)
title
- Title of this functionpars
- array of coefficients for polynomial functionparse
- 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, ExpressionBuilder function)
title
- Titlefunction
- ExpressionBuildermin
- Min valuemax
- Max valuepublic F1D(Expression calc, double min, double max)
calc
- expressionmin
- Min valuemax
- Max valuepublic F1D(String title, Expression calc, double min, double max)
title
- Titlefunction
- Expression after parsing and buildingpublic F1D(String title, Expression calc)
title
- Titlefunction
- Expression after parsing and buildingpublic F1D(Expression calc)
function
- expressionpublic F1D(ExpressionBuilder function)
function
- input of expressionpublic F1D(hep.aida.IFunction iname)
iname
- input IFunctionpublic F1D(String title, hep.aida.IFunction iname)
title
- Titleiname
- input IFunctionmin
- Min X valuesmax
- Max X valuespublic FProxy get()
proxy
- proxy of this function.public boolean parse()
public 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 xMin, double xMax)
XMin
- value in xXMax
- value in xpublic void eval()
public void eval(double min, double max, int Npoints)
Min
- value in xMax
- value in xNumber
- of evaluation pointspublic void doc()
public void toTable()
min
- max
- public void setPar(String parameter, double value)
parameter
- parameter namevalue
- value to be insertedpublic H1D getH1D()
public H1D getH1D(double min, double max)
min
- valuemax
- valuepublic 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 Expression getParse()
public void setPoints(int bins)
bins
- Number of pointspublic double integral()
public double integral(double min, double max)
min
- the first ordinate.max
- the last ordinate.public 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 double[] differentiate()
public int getPoints()
public String getException()
public void setMin(double min)
min
- Minimum valuepublic double getMin()
public void setMax(double max)
max
- Maximal valuepublic void set(FProxy f)
f
- public double getMax()
Jas4pp 1.5 © Java Analysis Studio for Particle Physics