public class F2D extends DrawOptions
Operators and functions
the following operators are supported:
Constructor and Description |
---|
F2D(Expression calc,
double Xmin,
double Xmax,
double Ymin,
double Ymax)
Create a function in 2D.
|
F2D(FProxy f)
Initialize function from proxy.
|
F2D(hep.aida.IFunction iname)
Create a F2D function from JAIDA IFunction.
|
F2D(hep.aida.IFunction iname,
double Xmin,
double Xmax,
double Ymin,
double Ymax)
Create a F2D function from JAIDA IFunction.
|
F2D(String name)
Create a function in 2D for evaluation.
|
F2D(String name,
double Xmin,
double Xmax,
double Ymin,
double Ymax)
Build a 2D function.
|
F2D(String title,
Expression calc,
double Xmin,
double Xmax,
double Ymin,
double Ymax)
Create a function in 2D.
|
F2D(String title,
hep.aida.IFunction iname,
double Xmin,
double Xmax,
double Ymin,
double Ymax)
Create a F2D function from JAIDA IFunction.
|
F2D(String title,
String name)
Create new function.
|
F2D(String title,
String name,
double Xmin,
double Xmax,
double Ymin,
double Ymax)
Create a function in 2D.
|
Modifier and Type | Method and Description |
---|---|
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.
|
double[][] |
eval(double[] x,
double[] y)
Evaluate a function for an array of x-values
|
double |
eval(double x,
double y)
Evaluate a function at a specific point in (x,y)
|
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.
|
String |
getException()
If error occurs at some step, this is the way to retrieve it.
|
H2D |
getH2D(String hname,
int hbinX,
double hminX,
double hmaxX,
int hbinY,
double hminY,
double hmaxY)
Generate a 2D histogram from the F2D function using a custom number of
bins and given min and max values.
|
hep.aida.IFunction |
getIFunction()
Get Jaida function
|
double |
getMaxX()
Get Max value in X
|
double |
getMaxY()
Get Max value in Y
|
double |
getMinX()
Get Min value in X
|
double |
getMinY()
Get Min value in Y
|
String |
getName()
Get the name of the function used for evaluation
|
Expression |
getParse()
Return parsed function.
|
int |
getPoints()
Get the number of points for evaluation of a function
|
double |
integral()
Integral using fastest trapezium rule method.
|
double |
integral(double minX,
double maxX,
double minY,
double maxY)
Integral using fastest trapezium rule method.
|
double |
integral(int N,
double minX,
double maxX,
double minY,
double maxY)
Numerical integration using trapezium rule.
|
double |
integral(int xSegs,
int ySegs,
double minX,
double maxX,
double minY,
double maxY)
Finds the volume under the surface described by the function f(x, y) for
a <= x <= b, c <= y <= d.
|
boolean |
isParsed()
If the function is parsed correctly, return true.
|
boolean |
numeric()
Perform some numeric substitutions.
|
boolean |
parse()
Parse the function.
|
void |
setMaxX(double max)
Set Max value in X
|
void |
setMaxY(double max)
Set Max value in Y
|
void |
setMinX(double min)
Set Min in X
|
void |
setMinY(double min)
Set Min value in Y
|
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 |
setPoints(int bins)
Get the number of points
|
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.
|
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 F2D(String name)
Operators and functions
the following operators are supported:
name
- String representing the functionpublic F2D(String title, String name)
title
- titlename
- definitionpublic F2D(String title, String name, double Xmin, double Xmax, double Ymin, double Ymax)
name
- String representing the function.Xmin
- Min value in XXmax
- Max value in XYmin
- Min value in YYmax
- Max value in Ypublic F2D(String name, double Xmin, double Xmax, double Ymin, double Ymax)
name
- NameXmin
- X-minXmax
- X-maxYmin
- Y-minYmax
- Y-maxpublic F2D(String title, hep.aida.IFunction iname, double Xmin, double Xmax, double Ymin, double Ymax)
title
- Titlename
- new function nameiname
- input IFunctionXmin
- Min X valueXmax
- Max X valueYmin
- Min Y valueYmax
- Max Y valuepublic F2D(String title, Expression calc, double Xmin, double Xmax, double Ymin, double Ymax)
title
- Titlefunction
- Expression after parsing and buildingXmin
- Min X valueXmax
- Max X valueYmin
- Min Y valueYmax
- Max Y valuepublic F2D(Expression calc, double Xmin, double Xmax, double Ymin, double Ymax)
title
- Titlefunction
- Expression after parsing and buildingXmin
- Min X valueXmax
- Max X valueYmin
- Min Y valueYmax
- Max Y valuepublic F2D(hep.aida.IFunction iname)
iname
- public F2D(FProxy f)
f
- public F2D(hep.aida.IFunction iname, double Xmin, double Xmax, double Ymin, double Ymax)
iname
- input IFunctionXmin
- Min X valueXmax
- Max X valueYmin
- Min Y valueYmax
- Max Y valuepublic double eval(double x, double y)
x
- value in x for evaluationy
- value in y for evaluationpublic hep.aida.IFunction getIFunction()
public double[][] eval(double[] x, double[] y)
x
- array of values in x for evaluationy
- array of values in y for evaluationpublic void setMinX(double min)
min
- Min valuepublic boolean parse()
public double getMinX()
public void setMinY(double min)
min
- Min value in Ypublic void doc()
public double getMinY()
public void setMaxX(double max)
max
- Max value in Xpublic void setName(String name)
name
- Namepublic String getName()
public double getMaxX()
public void setMaxY(double max)
max
- Max value in Ypublic double getMaxY()
public void setPoints(int bins)
bins
- Number of pointspublic void setPar(String parameter, double value)
parameter
- parameter namevalue
- value to be insertedpublic int getPoints()
public double integral(int N, double minX, double maxX, double minY, double maxY)
N
- the number of strips to use for integration (in X and Y the
same)minX
- the first ordinate in X.maxX
- the last ordinate in X.minY
- the first ordinate in X.maxY
- the last ordinate in Y.public double integral(double minX, double maxX, double minY, double maxY)
minX
- the first ordinate in X.maxX
- the last ordinate in X.minY
- the first ordinate in X.maxY
- the last ordinate in Y.public boolean simplify()
public String getException()
public Expression getParse()
public H2D getH2D(String hname, int hbinX, double hminX, double hmaxX, int hbinY, double hminY, double hmaxY)
hname
- histogram namehbinX
- number of X binshminX
- min value in XhmaxX
- max value in XhbinY
- number of bins in YhminY
- min value in YhmaxY
- max value in Ypublic double integral()
public double integral(int xSegs, int ySegs, double minX, double maxX, double minY, double maxY)
xSegs
- The number of segments in the x axis.ySegs
- The number of segments in the y axis.minX
- The lower bound of x.maxX
- The upper bound of x.minX
- The lower bound of y.maxY
- The upper bound of y.public boolean isParsed()
public String toMathML()
public String toJava()
public boolean elementary()
public boolean expand()
public boolean factorize()
public boolean numeric()
public FProxy get()
proxy
- proxy of this function.Jas4pp 1.5 © Java Analysis Studio for Particle Physics