|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectplf.Function_1D
public class Function_1D
This class allows the user to define a piecewise linear function.
| Constructor Summary | |
|---|---|
Function_1D(java.lang.String name,
double min_x_value,
double max_x_value,
double[] y_values)
The constructor stores the function value defintions. |
|
Function_1D(java.lang.String name,
double min_x_value,
double max_x_value,
int[] y_values)
The constructor stores the function value defintions. |
|
| Method Summary | |
|---|---|
Function_1D |
Differentiate(java.lang.String name)
Get the differentiated curve values. |
double |
getValue(double x_value)
Get the function value for a given input value. |
double[] |
getValues()
Get the function y_values for all input values as an array. |
java.util.ArrayList<java.lang.Double> |
getZeros()
Get the zero crossing x_values, if any. |
Function_1D |
Integrate(java.lang.String name)
Get the integrated curve values. |
void |
Print()
Formats the function definition into a string and prints it. |
java.lang.String |
toString()
Formats the function definition into a string. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public Function_1D(java.lang.String name,
double min_x_value,
double max_x_value,
double[] y_values)
throws java.lang.Exception
name - The name of the function represented.min_x_value - The minimum x_value.max_x_value - The maximum x_value.y_values - The array of y-axis values.
java.lang.Exception - if discrepencies are identified.
public Function_1D(java.lang.String name,
double min_x_value,
double max_x_value,
int[] y_values)
throws java.lang.Exception
name - The name of the function represented.min_x_value - The minimum x_value.max_x_value - The maximum x_value.y_values - The array of integer y-axis values.
java.lang.Exception - if discrepencies are identified.| Method Detail |
|---|
public double getValue(double x_value)
throws java.lang.Exception
x_value - the argument to the function.
java.lang.Exceptionpublic double[] getValues()
public Function_1D Integrate(java.lang.String name)
throws java.lang.Exception
name - The name for the new function.
java.lang.Exception
public Function_1D Differentiate(java.lang.String name)
throws java.lang.Exception
name - The name for the new function.
java.lang.Exceptionpublic java.util.ArrayList<java.lang.Double> getZeros()
public java.lang.String toString()
toString in class java.lang.Objectpublic void Print()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||