|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object edu.jhu.bme.smile.commons.optimize.FunctionNumeric1DDifferentiation
public class FunctionNumeric1DDifferentiation
This class does numeric differentiation in 1D. There are lots of methods of doing so, and depending on how many points are used, enter that value in for the method variable. Also computes 2nd derivatives. Defaults to 3-point method.
Field Summary | |
---|---|
static double |
DEFAULT_STEP
|
static int |
DIFF_3_POINT
|
static int |
DIFF_5_POINT
|
static int |
DIFF_7_POINT
|
static int |
DIFF_9_POINT
|
static int |
DIFF_BAC_EULER
|
static int |
DIFF_FWD_EULER
|
Constructor Summary | |
---|---|
FunctionNumeric1DDifferentiation(Optimizable1DContinuous function)
Constructor to create a 1D differentiable object. |
|
FunctionNumeric1DDifferentiation(Optimizable1DContinuous function,
double step,
int method)
Constructor to create a 1D differentiable object. |
Method Summary | |
---|---|
double |
get2ndDerivative(double x)
Gets the second derivative |
double |
getDerivative(double x)
Gets the first derivative |
double |
getDomainMax()
Gets the domain maximum |
double |
getDomainMin()
Gets the domain minimum |
double |
getDomainTolerance()
Gets the tolerance |
int |
getMethod()
Gets the method |
double |
getValue(double x)
Gets the value |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int DIFF_FWD_EULER
public static final int DIFF_BAC_EULER
public static final int DIFF_3_POINT
public static final int DIFF_5_POINT
public static final int DIFF_7_POINT
public static final int DIFF_9_POINT
public static final double DEFAULT_STEP
Constructor Detail |
---|
public FunctionNumeric1DDifferentiation(Optimizable1DContinuous function)
function
- function to differentiatepublic FunctionNumeric1DDifferentiation(Optimizable1DContinuous function, double step, int method)
function
- function to differentiatestep
- step size to usemethod
- the differentiating method to use: 0,1,3,5,7, or 9. Default is 3.Method Detail |
---|
public double get2ndDerivative(double x)
get2ndDerivative
in interface Optimizable1DContinuousDifferentiable
x
- location to evaluate derivative at
public double getDerivative(double x)
getDerivative
in interface Optimizable1DContinuousDifferentiable
x
- location to evaluate derivative at
public int getMethod()
public double getDomainMax()
getDomainMax
in interface Optimizable1DContinuous
public double getDomainMin()
getDomainMin
in interface Optimizable1DContinuous
public double getDomainTolerance()
getDomainTolerance
in interface Optimizable1DContinuous
public double getValue(double x)
getValue
in interface Optimizable1DContinuous
x
- location to get value at
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |