|
|||||||||
PREV CLASS NEXT CLASS | All Classes | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjhplot.DrawOptions
jhplot.F1D
public class F1D
Create a function in 1D. The function name could have parameters named in unique way as P0, P1, P2 ... They have to be replaced with values using setPar() method for evaluation
Constructor Summary | |
---|---|
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(graph.ParseFunction function,
double min,
double max)
Build a function. |
|
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,
hep.aida.IFunction iname,
double min,
double max)
Create F1D function from JAIDA IFunction. |
|
F1D(String title,
graph.ParseFunction function,
double min,
double max)
Create a function in 1D. |
|
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. |
Method Summary | |
---|---|
double[] |
differentiate(int N,
double min,
double max)
Numerical differentiation. |
void |
doc()
Show online documentation. |
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. |
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 |
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()
Return AIDA 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 |
graph.ParseFunction |
getParse()
Return parsed function. |
int |
getPoints()
Get the number of points |
String |
getTitle()
Get a function title |
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 |
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 |
void |
setTitle(String title)
Sets a new title of a function |
void |
toTable()
Print the F1D function to a Table in a separate Frame. |
void |
toTable(boolean format)
Print the F1D function to a Table in a separate Frame. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public F1D(String name, double min, double max)
Known Bugs This class is not fool proof. If the answer is wrong then use the parenthesis to force the order of evaluation. The most likely place this will be needed is in the use of the power command. The exponent is not evaluated correctly if it begins with a unary operator.
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)
If the answer is wrong then use the parenthesis to force the order of evaluation. The most likely place this will be needed is in the use of the power command. The exponent is not evaluated correctly if it begins with a unary operator.
name
- String representing the functionpublic F1D(String title, String name)
title
- titlename
- definitionpublic F1D(String title, String name, double min, double max, boolean parse)
Known Bugs This class is not fool proof. If the answer is wrong then use the parenthesis to force the order of evaluation. The most likely place this will be needed is in the use of the power command. The exponent is not evaluated correctly if it begins with a unary operator.
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)
name
- nameparse
- is parsed or not?public F1D(String title, graph.ParseFunction function, double min, double max)
Known Bugs This class is not fool proof. If the answer is wrong then use the parenthesis to force the order of evaluation. The most likely place this will be needed is in the use of the power command. The exponent is not evaluated correctly if it begins with a unary operator.
title
- Titlefunction
- ParseFunction representing the functionmin
- Min valuemax
- Max valuepublic F1D(graph.ParseFunction 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 valuesMethod Detail |
---|
public boolean parse()
true
- if parsed OKpublic double eval(double x)
x
- value in x for evaluation
public double[] eval(double[] x)
x
- array of values in x for evaluation
public 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 toTable(boolean format)
format
- if false, numbers will not be formatted to scientific format.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 histogram
public void setPar(String parameter, int value)
parameter
- parameter namevalue
- value to be inserted.public double getX(int i)
i
- index
public double getY(int i)
i
- index
public void setTitle(String title)
setTitle
in class DrawOptions
title
- Title of a functionpublic String getTitle()
getTitle
in class DrawOptions
public void setName(String name)
name
- Namepublic String getName()
public hep.aida.IFunction getIFunction()
public graph.ParseFunction 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 double[] getArrayX()
public double[] getArrayY()
public boolean isParsed()
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()
|
|||||||||
PREV CLASS NEXT CLASS | All Classes | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |