jhplot
Class FND

java.lang.Object
  extended by jhplot.DrawOptions
      extended by jhplot.FND
All Implemented Interfaces:
java.io.Serializable

public class FND
extends DrawOptions
implements java.io.Serializable

Create a function in multiple dimensions. 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

See Also:
Serialized Form

Constructor Summary
FND(java.lang.String name, java.lang.String vars)
          Create a function in any dimension evaluation.
 
Method Summary
 void diff(java.lang.String var)
          differentiate the expression and simplify
 double eval(java.lang.String vars)
          Evaluate a function at a specific point in x
 boolean eval(java.lang.String indvars, double xmin, double xmax)
          Evaluate a function at a specific point for one single variable.
 boolean eval(java.lang.String indvars, double xmin, double xmax, java.lang.String vars)
          Evaluate a function at a specific point for one single variable.
 java.lang.String getFixedVars()
          String with fixed variables
 double getMax()
          Get the maximum value in X
 double getMin()
          Get the minimum value in X
 java.lang.String getName()
          Get the name of the function used for evaluation
 int getPoints()
          Get the number of points
 java.lang.String[] getVars()
          Return all variables
 double getX(int i)
          Get value in X-axis
 double getY(int i)
          Get value in Y-axis
 void setComplex()
          Treat the function as complex.
 void setMax(double max)
          Set the maximum value in X
 void setMin(double min)
          Set Min value in X
 void setName(java.lang.String name)
          Sets a name of the function, i.e.
 void setPoints(int bins)
          Sets the number points between Min and Max for evaluation
 void simplify()
          Treat the function as complex.
 java.lang.String toString()
          Convert to string
 
Methods inherited from class jhplot.DrawOptions
copyLinePars, getBinWidth, getDrawOption, getDrawOptions, getLegend, getLineParm, getNameX, getNameY, getNameZ, getTitle, getType, printDrawOptions, printDrawOptions, setBinWidth, setColor, setDrawLine, setDrawLineKey, setDrawOption, setDrawSymbol, setErr, setErrAll, setErrColor, setErrColorX, setErrColorY, setErrFill, setErrFillColor, setErrFillColor, setErrSys, setErrSysFill, setErrSysFillColor, setErrSysFillColor, setErrSysX, setErrSysY, setErrTicSize, setErrX, setErrY, setFill, setFillColor, setFillColorTransparency, setGraphStyle, setLegend, setNameX, setNameY, setNameZ, setPenDash, setPenDash, setPenWidth, setPenWidthErr, setPenWidthErrSys, setStyle, setSymbol, setSymbolSize, setTitle, setType
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

FND

public FND(java.lang.String name,
           java.lang.String vars)
Create a function in any dimension evaluation. The function may have many independent variables.

List of commands

Parameters:
name - String representing the function
vars - String representing variables. Each variable should be separated by a comma. Example "x,y,z"
Method Detail

setComplex

public void setComplex()
Treat the function as complex.


simplify

public void simplify()
Treat the function as complex.


diff

public void diff(java.lang.String var)
differentiate the expression and simplify

Parameters:
var - variable used for differentiation

getVars

public java.lang.String[] getVars()
Return all variables

Returns:
array array with variables

toString

public java.lang.String toString()
Convert to string

Overrides:
toString in class java.lang.Object

eval

public double eval(java.lang.String vars)
Evaluate a function at a specific point in x

Parameters:
vars - Values for evaluation separated by commas, x=1,y=2,z=3
Returns:
function value at x

eval

public boolean eval(java.lang.String indvars,
                    double xmin,
                    double xmax,
                    java.lang.String vars)
Evaluate a function at a specific point for one single variable. Evaluation is done between xmin and xmax

Parameters:
indvars - Define independent variable, like 'x' Only one variable is allowed
xmin - xmin value for independent varible
xmax - xmax value for independent varible
vars - define values for other variables, like 'y=1,z=3'
Returns:
true if no errors

eval

public boolean eval(java.lang.String indvars,
                    double xmin,
                    double xmax)
Evaluate a function at a specific point for one single variable. Evaluation is done between xmin and xmax. It is assumed that there are no any other variable involved

Parameters:
indvars - Define independent variable, like 'x' Only one variable is allowed
xmin - xmin value for independent varible
xmax - xmax value for independent varible
Returns:
true if no errors

getX

public double getX(int i)
Get value in X-axis

Parameters:
i - index
Returns:
value in X

getY

public double getY(int i)
Get value in Y-axis

Parameters:
i - index
Returns:
value in Y

setName

public void setName(java.lang.String name)
Sets a name of the function, i.e. what will be used for evaluation

Parameters:
name - Name

getName

public java.lang.String getName()
Get the name of the function used for evaluation

Returns:
Name

setMin

public void setMin(double min)
Set Min value in X

Parameters:
min - Minimum value

getMin

public double getMin()
Get the minimum value in X

Returns:
min Minimum value

setMax

public void setMax(double max)
Set the maximum value in X

Parameters:
max - Maximal value

getMax

public double getMax()
Get the maximum value in X

Returns:
Maximal value

setPoints

public void setPoints(int bins)
Sets the number points between Min and Max for evaluation

Parameters:
bins - Number of points

getPoints

public int getPoints()
Get the number of points

Returns:
Number of points

getFixedVars

public java.lang.String getFixedVars()
String with fixed variables

Returns:
String with fixed variables


jHepWork 1.7 (C) Chekanov